|
IcedTea-Web NetX |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jnlp.util.Reflect
public class Reflect
Provides simply, convenient methods to invoke methods by name. This class is used to consolidate reflection needed to access methods specific to Sun's JVM or to remain backward compatible while supporting method in newer JVMs.
Most methods of this class invoke the first method on the specified object that matches the name and number of parameters. The type of the parameters are not considered, so do not attempt to use this class to invoke overloaded methods.
Instances of this class are not synchronized.
Constructor Summary | |
---|---|
Reflect()
Create a new Reflect instance. |
|
Reflect(boolean accessible)
Create a new Reflect instance. |
Method Summary | |
---|---|
java.lang.reflect.Method |
getMethod(java.lang.Class type,
java.lang.String method,
java.lang.Object[] args)
Return the Method matching the specified name and number of arguments. |
java.lang.Object |
invoke(java.lang.Object object,
java.lang.String method)
Invoke a zero-parameter method by name on the specified object. |
java.lang.Object |
invoke(java.lang.Object object,
java.lang.String method,
java.lang.Object[] args)
Invoke a method by name with the specified parameters. |
java.lang.Object |
invokeStatic(java.lang.String className,
java.lang.String method)
Invoke a zero-parameter static method by name. |
java.lang.Object |
invokeStatic(java.lang.String className,
java.lang.String method,
java.lang.Object[] args)
Invoke the static method using the specified parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Reflect()
public Reflect(boolean accessible)
accessible
- whether to bypass access permissionsMethod Detail |
---|
public java.lang.Object invokeStatic(java.lang.String className, java.lang.String method)
public java.lang.Object invokeStatic(java.lang.String className, java.lang.String method, java.lang.Object[] args)
public java.lang.Object invoke(java.lang.Object object, java.lang.String method)
public java.lang.Object invoke(java.lang.Object object, java.lang.String method, java.lang.Object[] args)
public java.lang.reflect.Method getMethod(java.lang.Class type, java.lang.String method, java.lang.Object[] args)
|
IcedTea-Web NetX |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |