|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.jexl3.internal.introspection.ConstructorMethod
public final class ConstructorMethod
A JexlMethod that wraps a constructor.
| Method Summary | |
|---|---|
static ConstructorMethod |
discover(Introspector is,
Object ctorHandle,
Object... args)
Discovers a class constructor and wrap it as a JexlMethod. |
Class<?> |
getReturnType()
returns the return type of the method invoked. |
Object |
invoke(Object obj,
Object... params)
Invocation method, called when the method invocation should be performed and a value returned. |
boolean |
isCacheable()
Specifies if this JexlMethod is cacheable and able to be reused for this class of object it was returned for. |
boolean |
tryFailed(Object rval)
Checks whether a tryInvoke return value indicates a failure or not. |
Object |
tryInvoke(String name,
Object obj,
Object... params)
Attempts to reuse this JexlMethod, checking that it is compatible with the actual set of arguments. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static ConstructorMethod discover(Introspector is,
Object ctorHandle,
Object... args)
is - the introspectorctorHandle - a class or class nameargs - constructor arguments
JexlMethod
public Object invoke(Object obj,
Object... params)
throws Exception
JexlMethod
invoke in interface JexlMethodobj - the objectparams - method parameters.
Exception - on any error.
public Object tryInvoke(String name,
Object obj,
Object... params)
JexlMethod
tryInvoke in interface JexlMethodname - the method nameobj - the object to invoke the method uponparams - the method arguments
public boolean tryFailed(Object rval)
JexlMethodUsage is : Object r = tryInvoke(...); if (tryFailed(r) {...} else {...}
tryFailed in interface JexlMethodrval - the value returned by tryInvoke
public boolean isCacheable()
JexlMethod
isCacheable in interface JexlMethodpublic Class<?> getReturnType()
JexlMethod
getReturnType in interface JexlMethod
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||