Skip to content

Commit

Permalink
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/src/main/java/org/jruby/javasupport/JavaConstructor.java
Original file line number Diff line number Diff line change
@@ -186,6 +186,10 @@ public String toGenericString() {
return constructor.toGenericString();
}

public Class<?> getDeclaringClass() {
return constructor.getDeclaringClass();
}

public AccessibleObject accessibleObject() {
return constructor;
}
@@ -200,6 +204,11 @@ public IRubyObject return_type() {
return getRuntime().getNil();
}

@JRubyMethod
public IRubyObject declaring_class() {
return JavaClass.get(getRuntime(), getDeclaringClass());
}

@JRubyMethod(rest = true)
public final IRubyObject new_instance(final IRubyObject[] args) {
return new_instance( convertArguments(args) );

0 comments on commit b2d759a

Please sign in to comment.