org.jboss.reflect.plugins.introspection
Class ReflectMethodInfoImpl

java.lang.Object
  extended by org.jboss.util.JBossObject
      extended by org.jboss.reflect.plugins.AbstractAnnotatedInfo
          extended by org.jboss.reflect.plugins.AnnotationHolder
              extended by org.jboss.reflect.plugins.MethodInfoImpl
                  extended by org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl
All Implemented Interfaces:
Serializable, Cloneable, AnnotatedInfo, MemberInfo, MethodInfo, ModifierInfo, org.jboss.util.JBossInterface

public class ReflectMethodInfoImpl
extends MethodInfoImpl

Method info

Author:
Bill Burke, Adrian Brock, Ales Justin
See Also:
Serialized Form

Field Summary
protected  Method method
          The method
 
Fields inherited from class org.jboss.reflect.plugins.MethodInfoImpl
declaringClass, exceptionTypes, hash, modifiers, name, parameters, parameterTypes, returnType
 
Fields inherited from class org.jboss.reflect.plugins.AnnotationHolder
annotationMap, annotationsArray
 
Fields inherited from class org.jboss.util.JBossObject
hashCode, log, toString
 
Fields inherited from interface org.jboss.reflect.spi.MethodInfo
NO_EXCEPTIONS, NO_PARAMS, NO_PARAMS_TYPES
 
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
 
Constructor Summary
ReflectMethodInfoImpl()
          Create a new method info
ReflectMethodInfoImpl(AnnotationValue[] annotations, String name, TypeInfo returnType, ParameterInfo[] parameters, ClassInfo[] exceptionTypes, int modifiers, ClassInfo declaring)
          Create a new MethodInfo.
ReflectMethodInfoImpl(AnnotationValue[] annotations, String name, TypeInfo returnType, TypeInfo[] parameterTypes, AnnotationValue[][] parameterAnnotations, ClassInfo[] exceptionTypes, int modifiers, ClassInfo declaring)
          Create a new MethodInfo.
 
Method Summary
protected  void accessCheck()
          Check access permission.
protected  void accessCheck(boolean isPublic)
          Check access permission.
 Method getMethod()
          Get the method
 Object invoke(Object target, Object[] args)
          Invoke the method
 void setMethod(Method method)
          Set the method
 
Methods inherited from class org.jboss.reflect.plugins.MethodInfoImpl
calculateHash, equals, getDeclaringClass, getExceptionTypes, getModifiers, getName, getParameters, getParameterTypes, getReturnType, hashCode, isPublic, isStatic, isVolatile, toShortString, toString
 
Methods inherited from class org.jboss.reflect.plugins.AnnotationHolder
getAnnotation, getAnnotations, isAnnotationPresent, setupAnnotations
 
Methods inherited from class org.jboss.reflect.plugins.AbstractAnnotatedInfo
getUnderlyingAnnotation, getUnderlyingAnnotations, isAnnotationPresent
 
Methods inherited from class org.jboss.util.JBossObject
cacheGetHashCode, cacheToString, clone, equals, flushJBossObjectCache, getClassShortName, getHashCode, list, notEqual, toShortString, toString, toStringImplementation
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
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
 

Field Detail

method

protected transient Method method
The method

Constructor Detail

ReflectMethodInfoImpl

public ReflectMethodInfoImpl()
Create a new method info


ReflectMethodInfoImpl

public ReflectMethodInfoImpl(AnnotationValue[] annotations,
                             String name,
                             TypeInfo returnType,
                             TypeInfo[] parameterTypes,
                             AnnotationValue[][] parameterAnnotations,
                             ClassInfo[] exceptionTypes,
                             int modifiers,
                             ClassInfo declaring)
Create a new MethodInfo.

Parameters:
annotations - the annotations
name - the method name
returnType - the return type
parameterTypes - the parameter types
parameterAnnotations - the parameter annotations
exceptionTypes - the exception types
modifiers - the modifiers
declaring - the declaring class

ReflectMethodInfoImpl

public ReflectMethodInfoImpl(AnnotationValue[] annotations,
                             String name,
                             TypeInfo returnType,
                             ParameterInfo[] parameters,
                             ClassInfo[] exceptionTypes,
                             int modifiers,
                             ClassInfo declaring)
Create a new MethodInfo.

Parameters:
annotations - the annotations
name - the method name
returnType - the return type
parameters - the parameters
exceptionTypes - the exception types
modifiers - the modifiers
declaring - the declaring class
Method Detail

setMethod

public void setMethod(Method method)
Set the method

Parameters:
method - the method

getMethod

public Method getMethod()
Get the method

Returns:
the method

accessCheck

protected final void accessCheck()
Check access permission.


accessCheck

protected final void accessCheck(boolean isPublic)
Check access permission.

Parameters:
isPublic - whether the field is public

invoke

public Object invoke(Object target,
                     Object[] args)
              throws Throwable
Description copied from interface: MethodInfo
Invoke the method

Specified by:
invoke in interface MethodInfo
Overrides:
invoke in class MethodInfoImpl
Parameters:
target - the target
args - the arguments
Returns:
the result of the invocation
Throws:
Throwable - for any error


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