public class JavassistMethodInfo extends JavassistAnnotatedParameterInfo implements MutableMethodInfo, MethodInfoInternal
MutableMethodInfo
.MutableMethodInfo
,
Serialized FormctBehavior, exceptionTypes, parameters, parameterTypes, typeInfo
annotationHelper, annotationMap, annotationsArray
NO_EXCEPTIONS, NO_PARAMS, NO_PARAMS_TYPES
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 and Description |
---|
JavassistMethodInfo(SignatureKey signatureKey,
AnnotationHelper annotationHelper,
JavassistTypeInfo typeInfo,
javassist.CtMethod ctMethod)
Create a new JavassistMethodInfo.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
void |
executeCommand(MutableMethodInfoCommand mmc)
TODO: something similar to CtBehavior.instrument(...)
|
javassist.CtMethod |
getCtMethod() |
protected int |
getHashCode() |
String |
getName()
Get the method name
|
int |
getNumberParameters() |
TypeInfo |
getReturnType()
Get the return type
|
Object |
invoke(Object target,
Object[] args)
Invoke the method
|
void |
setName(String name)
Method name
|
void |
setReturnType(ClassInfo returnType)
Set type of the returned value
|
void |
setReturnType(String returnType)
Set type of the returned value
|
void |
toShortString(org.jboss.util.JBossStringBuilder buffer) |
protected void |
toString(org.jboss.util.JBossStringBuilder buffer) |
createParameterAnnotations, generateParameters, getAnnotations, getDeclaringClass, getDescriptor, getExceptionTypes, getMethodSignature, getModifiers, getParameters, getParameterTypes, getSignatureKey, isPublic, isStatic, isVolatile, setBody, setExceptions, setExceptions, setModifier, setParameters, setParameters, setupParameterAnnotations
getAnnotation, getAnnotations, isAnnotationPresent, setupAnnotations
getUnderlyingAnnotation, getUnderlyingAnnotations, isAnnotationPresent
cacheGetHashCode, cacheToString, clone, equals, flushJBossObjectCache, getClassShortName, hashCode, list, notEqual, toShortString, toString, toStringImplementation
finalize, getClass, notify, notifyAll, wait, wait, wait
setBody, setExceptions, setExceptions, setModifier, setParameters, setParameters
getExceptionTypes, getParameters, getParameterTypes
getAnnotation, getAnnotations, getUnderlyingAnnotation, getUnderlyingAnnotations, isAnnotationPresent, isAnnotationPresent
getDeclaringClass
getModifiers, isPublic, isStatic, isVolatile
public JavassistMethodInfo(SignatureKey signatureKey, AnnotationHelper annotationHelper, JavassistTypeInfo typeInfo, javassist.CtMethod ctMethod)
annotationHelper
- the annotation helpertypeInfo
- the type infoctMethod
- the methodpublic String getName()
MethodInfo
getName
in interface MethodInfo
getName
in class JavassistAnnotatedParameterInfo
public TypeInfo getReturnType()
MethodInfo
getReturnType
in interface MethodInfo
public Object invoke(Object target, Object[] args) throws Throwable
MethodInfo
invoke
in interface MethodInfo
target
- the targetargs
- the argumentsThrowable
- for any errorprotected int getHashCode()
getHashCode
in class org.jboss.util.JBossObject
public void toShortString(org.jboss.util.JBossStringBuilder buffer)
toShortString
in interface org.jboss.util.JBossInterface
toShortString
in class org.jboss.util.JBossObject
protected void toString(org.jboss.util.JBossStringBuilder buffer)
toString
in class org.jboss.util.JBossObject
public void executeCommand(MutableMethodInfoCommand mmc)
MutableMethodInfo
executeCommand
in interface MutableMethodInfo
public javassist.CtMethod getCtMethod()
public void setName(String name)
MutableMethodInfo
setName
in interface MutableMethodInfo
public void setReturnType(String returnType)
MutableMethodInfo
setReturnType
in interface MutableMethodInfo
public void setReturnType(ClassInfo returnType)
MutableMethodInfo
setReturnType
in interface MutableMethodInfo
public int getNumberParameters()
getNumberParameters
in interface MethodInfoInternal
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.