|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.actf.validation.core.Reflector.Result
public class Reflector.Result
used primarily by the Reflector class to return the results of introspection
Constructor Summary | |
---|---|
Reflector.Result(Object member,
Object value)
create a new Reflector.Result for a reflected Field member |
|
Reflector.Result(Object member,
Object[] params)
create a new Reflector.Result |
Method Summary | |
---|---|
String[] |
getFormattedParameters()
returns the formatted parameters. |
Object |
getMember()
gets the reflected class member (e.g. |
Object[] |
getParameters()
gets the parameters to be used for invokation of the reflected class member |
Object |
getValue()
gets the value of the member should the member be a Field or returns the result of a method invokation or constructor call. |
Object |
invoke(Object object)
invoke the member Constructor or Method with the corresponding parameters on the specified object (which may be null ) |
boolean |
isConstructor()
returns true if member is not null and is an instance of
java.lang.reflect.Constructor |
boolean |
isField()
returns true if member is not null and is an instance of
java.lang.reflect.Field |
boolean |
isMethod()
returns true if member is not null and is an instance of
java.lang.reflect.Method |
void |
setFormattedParameters(String[] params)
set the formatted parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Reflector.Result(Object member, Object[] params)
member
- -- reflected memberparams
- -- parameters to be used upon invokation of memberpublic Reflector.Result(Object member, Object value)
member
- -- reflected Field membervalue
- -- value of FieldMethod Detail |
---|
public Object getMember()
public Object[] getParameters()
public void setFormattedParameters(String[] params)
format
method of the code generator being used.
params
- -- the formatted parameters ready for source code placementpublic String[] getFormattedParameters()
setFormattedParameters(String[])
public Object getValue()
null
for the latter two cases until invoke
is called.
public boolean isConstructor()
true
if member is not null
and is an instance of
java.lang.reflect.Constructor
true
if this Result holds a Constructor member, false
otherwisepublic boolean isMethod()
true
if member is not null
and is an instance of
java.lang.reflect.Method
true
if this Result holds a Method member, false
otherwisepublic boolean isField()
true
if member is not null
and is an instance of
java.lang.reflect.Field
true
if this Result holds a Field member, false
otherwisepublic Object invoke(Object object) throws Exception
null
)
object
- -- object upon which to invoke method
(or null
if method is static)
Exception
- - any exception thrown by members of the Reflection API may be thrown
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |