org.jboss.reflect.plugins.bytecode
Class BytecodeMethodInfo
java.lang.Object
org.jboss.util.JBossObject
org.jboss.reflect.plugins.AbstractAnnotatedInfo
org.jboss.reflect.plugins.bytecode.BytecodeAnnotatedInfo
org.jboss.reflect.plugins.bytecode.BytecodeBehaviourInfo
org.jboss.reflect.plugins.bytecode.BytecodeMethodInfo
- All Implemented Interfaces:
- Serializable, Cloneable, MethodInfoInternal, AnnotatedInfo, MemberInfo, MethodInfo, ModifierInfo, org.jboss.util.JBossInterface
public class BytecodeMethodInfo
- extends BytecodeBehaviourInfo
- implements MethodInfo, MethodInfoInternal
MethodInfo that relies on Javassist to answer reflective queries and to invoke
the represented method.
This class also relies on Javassist to perform the instrumentation operations defined in
MutableMethodInfo
.
- Version:
- $Revision: 105101 $
- Author:
- Adrian Brock, Kabir Khan
- See Also:
MutableMethodInfo
,
Serialized Form
Fields inherited from class org.jboss.util.JBossObject |
hashCode, log, toString |
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 |
Methods inherited from class org.jboss.reflect.plugins.bytecode.BytecodeBehaviourInfo |
createParameterAnnotations, generateParameters, getAnnotations, getDeclaringClass, getDescriptor, getExceptionTypes, getMethodSignature, getModifiers, getParameters, getParameterTypes, getSignatureKey, isPublic, isStatic, isVolatile, setupParameterAnnotations |
Methods inherited from class org.jboss.util.JBossObject |
cacheGetHashCode, cacheToString, clone, equals, flushJBossObjectCache, getClassShortName, hashCode, list, notEqual, toShortString, toString, toStringImplementation |
Methods inherited from interface org.jboss.util.JBossInterface |
clone, toShortString |
BytecodeMethodInfo
public BytecodeMethodInfo(AnnotationHelper annotationHelper,
BytecodeTypeInfo typeInfo,
MethodBytes method)
- Create a new JavassistMethodInfo.
- Parameters:
annotationHelper
- the annotation helpertypeInfo
- the type infomethod
- the method
getName
public String getName()
- Description copied from interface:
MethodInfo
- Get the method name
- Specified by:
getName
in interface MethodInfo
- Specified by:
getName
in class BytecodeBehaviourInfo
- Returns:
- the method name
getNumberParameters
public int getNumberParameters()
- Specified by:
getNumberParameters
in interface MethodInfoInternal
getReturnType
public TypeInfo getReturnType()
- Description copied from interface:
MethodInfo
- Get the return type
- Specified by:
getReturnType
in interface MethodInfo
- Returns:
- the return type
invoke
public Object invoke(Object target,
Object[] args)
throws Throwable
- Description copied from interface:
MethodInfo
- Invoke the method
- Specified by:
invoke
in interface MethodInfo
- Parameters:
target
- the targetargs
- the arguments
- Returns:
- the result of the invocation
- Throws:
Throwable
- for any error
getHashCode
protected int getHashCode()
- Overrides:
getHashCode
in class org.jboss.util.JBossObject
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
toShortString
public void toShortString(org.jboss.util.JBossStringBuilder buffer)
- Specified by:
toShortString
in interface org.jboss.util.JBossInterface
- Overrides:
toShortString
in class org.jboss.util.JBossObject
toString
protected void toString(org.jboss.util.JBossStringBuilder buffer)
- Overrides:
toString
in class org.jboss.util.JBossObject
Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.