Novell exteNd Web Services SDK API

com.sssw.jbroker.web.portable.annotation
Class MethodInfo

java.lang.Object
  extended bycom.sssw.jbroker.web.portable.annotation.MethodInfo

public final class MethodInfo
extends Object

Objects of type MethodInfo can be used to store annotations for a java.lang.reflect.Method object.

Since:
jBroker Web 2.0
See Also:
ClassInfo

Constructor Summary
MethodInfo(Method method)
          Construct a method information object for a given method.
 
Method Summary
 ClassInfo getExceptionTypeInfo(Class exception)
          Get a ClassInfo object for a given exception class.
 Method getMethodObject()
          Get the method object for which this MethodInfo object manages properties.
 int getParameterCount()
          Get the number of parameters for this method
 ParamInfo getParameterTypeInfo(int index)
          Get a ParamInfo object for a given index.
 Object getProperty(String key)
          Get a property for this class
 ParamInfo getReturnTypeInfo()
          Get a ParamInfo object for the method's return class.
 void setProperty(String key, Object value)
          Set a property for this class
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodInfo

public MethodInfo(Method method)
Construct a method information object for a given method.

Parameters:
method - the method
Method Detail

getMethodObject

public Method getMethodObject()
Get the method object for which this MethodInfo object manages properties.

Returns:
the method that this object was constructed with

getProperty

public Object getProperty(String key)
Get a property for this class

Parameters:
key - the property name
Returns:
the property value, or null if no value found

setProperty

public void setProperty(String key,
                        Object value)
Set a property for this class

Parameters:
key - the property name
value - the property value

getParameterCount

public int getParameterCount()
Get the number of parameters for this method

Returns:
number of parameters

getParameterTypeInfo

public ParamInfo getParameterTypeInfo(int index)
Get a ParamInfo object for a given index. The order of parameters is the same as when calling the getParameterTypes method on the java.lang.reflect.Method object.

Parameters:
index - the parameter index
Returns:
a ParamInfo object for the parameter class at the specified index
Throws:
ArrayIndexOutOfBoundsException - if parameter index is invalid

getReturnTypeInfo

public ParamInfo getReturnTypeInfo()
Get a ParamInfo object for the method's return class.

Returns:
a ParamInfo object for the return class

getExceptionTypeInfo

public ClassInfo getExceptionTypeInfo(Class exception)
Get a ClassInfo object for a given exception class.

Parameters:
exception - the exception class
Returns:
a ClassInfo object for the exception class or null if the specified exception was not declared on this method

Novell exteNd Web Services SDK API

exteNd is a registered trademark of Novell, Inc.
Copyright 1998-2003 Novell, Inc. All Rights Reserved.