org.jboss.reflect.spi
Interface MethodInfo

All Superinterfaces:
AnnotatedInfo, Cloneable, org.jboss.util.JBossInterface, MemberInfo, ModifierInfo
All Known Implementing Classes:
JavassistMethodInfo, MethodInfoImpl, ReflectMethodInfoImpl

public interface MethodInfo
extends AnnotatedInfo, MemberInfo

Method info

Author:
Bill Burke, Adrian Brock

Field Summary
static ClassInfo[] NO_EXCEPTIONS
          No Exceptions
static ParameterInfo[] NO_PARAMS
          No parameters
static TypeInfo[] NO_PARAMS_TYPES
          No parameters
 
Fields inherited from interface org.jboss.reflect.spi.ModifierInfo
ABSTRACT, CONSTANT, FINAL, PACKAGE, PACKAGE_ABSTRACT, PACKAGE_CONSTANT, PACKAGE_STATIC, PRIVATE, PRIVATE_CONSTANT, PRIVATE_STATIC, PROTECTED, PROTECTED_ABSTRACT, PROTECTED_CONSTANT, PROTECTED_STATIC, PUBLIC, PUBLIC_ABSTRACT, PUBLIC_CONSTANT, PUBLIC_STATIC, STATIC
 
Method Summary
 ClassInfo[] getExceptionTypes()
          Get the exception types
 String getName()
          Get the method name
 ParameterInfo[] getParameters()
          Get the parameters
 TypeInfo[] getParameterTypes()
          Get the parameter types
 TypeInfo getReturnType()
          Get the return type
 Object invoke(Object target, Object[] args)
          Invoke the method
 
Methods inherited from interface org.jboss.reflect.spi.AnnotatedInfo
getAnnotation, getAnnotations, getUnderlyingAnnotation, getUnderlyingAnnotations, isAnnotationPresent, isAnnotationPresent
 
Methods inherited from interface org.jboss.util.JBossInterface
clone, toShortString, toShortString
 
Methods inherited from interface org.jboss.reflect.spi.MemberInfo
getDeclaringClass
 
Methods inherited from interface org.jboss.reflect.spi.ModifierInfo
getModifiers, isPublic, isStatic, isVolatile
 

Field Detail

NO_PARAMS_TYPES

static final TypeInfo[] NO_PARAMS_TYPES
No parameters


NO_PARAMS

static final ParameterInfo[] NO_PARAMS
No parameters


NO_EXCEPTIONS

static final ClassInfo[] NO_EXCEPTIONS
No Exceptions

Method Detail

getName

String getName()
Get the method name

Returns:
the method name

getParameterTypes

TypeInfo[] getParameterTypes()
Get the parameter types

Returns:
the parameter types

getParameters

ParameterInfo[] getParameters()
Get the parameters

Returns:
the parameters

getExceptionTypes

ClassInfo[] getExceptionTypes()
Get the exception types

Returns:
the exception types

getReturnType

TypeInfo getReturnType()
Get the return type

Returns:
the return type

invoke

Object invoke(Object target,
              Object[] args)
              throws Throwable
Invoke the method

Parameters:
target - the target
args - the arguments
Returns:
the result of the invocation
Throws:
Throwable - for any error


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.