|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A CacheMethod
provides information about, and access
to, a single method on a Cache class. The reflected method may be a
class method or an instance method
Method Summary | |
Iterator |
getArgumentIterator()
Returns iterator over method argument types. |
CacheArgument[] |
getArgumentTypes()
Returns an array containing method argument types. |
CacheClass |
getDeclaringClass()
Returns the class in which method is declared. |
Class |
getJavaReturnType()
Returns the return type of the method when it is run from Java client. |
String |
getJavaReturnTypeName()
Returns the Java name of the return type of the method when it is run from Java client. |
int |
getModifiers()
Returns Cache modifiers for the CacheMethod . |
String |
getName()
Returns the name of the method. |
CacheClass |
getReturnType()
Returns the return type of the method when it is run in Cache. |
String |
getSignature()
Returns signature of the method as it appears in CacheObject Script. |
Object |
invoke(int oref,
Object[] args)
Runs the method in Cache. |
Object |
invoke(RegisteredObject obj,
Object[] args)
Runs the method in Cache. |
Method Detail |
public String getName()
CacheMethod
object, as a String
public CacheClass getReturnType() throws CacheException
CacheClass
object that represents the
formal return type of the method represented by this
CacheMethod
object.
CacheException
public Class getJavaReturnType() throws CacheException
java.lang.Class
object that represents the
formal return type of the method represented by this
CacheMethod
object.
CacheException
public String getJavaReturnTypeName() throws CacheException
java.lang.Class
object that represents the
formal return type of the method represented by this
CacheMethod
object.
CacheException
public CacheArgument[] getArgumentTypes() throws CacheException
CacheArgument
objects that
represent the formal argument types, in declaration order, of
the method represented by this CacheMethod
object. Returns an array of length 0 if the underlying method
takes no arguments. Method getType
of
CacheArgument
class can be used to obtain argument
types as CacheClass
.
CacheException
CacheDescription.getType()
public CacheClass getDeclaringClass() throws CacheException
CacheClass
object representing the
class that declares the method represented by this
CacheMethod
object.
CacheException
public Iterator getArgumentIterator() throws CacheException
CacheException
public int getModifiers()
CacheMethod
.
Possible modifiers: CacheModifier.STATIC
,
CacheModifier.RETURNS_VALUE
,
CacheModifier.LITERAL
CacheMethod
represented
as an int
. The CacheModifier
class
should be used to decode the modifiers.CacheModifier
public String getSignature() throws CacheException
CacheClass.getMethod(String signature)
method.
CacheException
CacheClass.getMethod(java.lang.String)
public Object invoke(RegisteredObject obj, Object[] args) throws CacheException, IllegalArgumentException
obj
- Instance for which the method will be run.
If the underlying method is static, then the specified obj
argument is ignored. It may be null.args
- Array of parameters passed to the
method. Parameters may be represented as natural Java
objects. For instance, if parameter is of type
%Library.Integer
corresponding element in array
may be java.lang.Integer
.
If parameter is passed by reference, then it can also be of
corresponding Holder class,
e.g. com.intersys.objects.IntegerHolder
. In any
case the value returned by reference is placed in the
corresponding element of the array after method is
completed. If original parameter was
java.lang.Integer
then returned value would be
java.lang.Integer
as well. If it was
com.intersys.objects.IntegerHolder
then it will be
the same com.intersys.objects.IntegerHolder
instance with replaced value.
CacheException
IllegalArgumentException
public Object invoke(int oref, Object[] args) throws CacheException, IllegalArgumentException
Unless there is a specific reason to use this form using method
it is reommended to use invoke(RegisteredObject obj,
Object[] args)
.
oref
- Integer value corresponding to object reference of
the object, for which the method will be run. If the
underlying method is static, then the specified oref argument
is ignored.args
- Array of parameters passed to the
method. Parameters may be represented as natural Java
objects. For instance, if parameter is of type
%Library.Integer
corresponding element in array
may be java.lang.Integer
.
If parameter is passed by reference, then it can also be of
corresponding Holder class,
e.g. com.intersys.objects.IntegerHolder
. In any
case the value returned by reference is placed in the
corresponding element of the array after method is
completed. If original parameter was
java.lang.Integer
then returned value would be
java.lang.Integer
as well. If it was
com.intersys.objects.IntegerHolder
then it will be
the same com.intersys.objects.IntegerHolder
instance with replaced value.
CacheException
IllegalArgumentException
invoke(com.intersys.classes.RegisteredObject,Object[])
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |