public interface MutableMethodInfo extends MethodInfo
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
Modifier and Type | Method and Description |
---|---|
void |
executeCommand(MutableMethodInfoCommand mmc)
TODO: something similar to CtBehavior.instrument(...)
|
void |
setBody(Body body)
The source text of the method body
|
void |
setExceptions(ClassInfo[] exceptions)
A list of the exception types
|
void |
setExceptions(String[] exceptions)
A list of the exception types
|
void |
setModifier(ModifierInfo mi)
Set modifier
If not set it will default to public (non-static)
|
void |
setName(String name)
Method name
|
void |
setParameters(ClassInfo[] parameters)
A list of the parameter types
|
void |
setParameters(String[] parameters)
A list of the parameter types
|
void |
setReturnType(ClassInfo returnType)
Set type of the returned value
|
void |
setReturnType(String returnType)
Set type of the returned value
|
getExceptionTypes, getName, getParameters, getParameterTypes, getReturnType, invoke
getAnnotation, getAnnotations, getUnderlyingAnnotation, getUnderlyingAnnotations, isAnnotationPresent, isAnnotationPresent
getDeclaringClass
getModifiers, isPublic, isStatic, isVolatile
void setModifier(ModifierInfo mi)
mi
- void setReturnType(String returnType)
returnType
- void setReturnType(ClassInfo returnType)
returnType
- void setName(String name)
name
- void setBody(Body body)
body
- void setParameters(String[] parameters)
parameters
- void setParameters(ClassInfo[] parameters)
parameters
- void setExceptions(String[] exceptions)
exceptions
- void setExceptions(ClassInfo[] exceptions)
exceptions
- void executeCommand(MutableMethodInfoCommand mmc)
mmc
- Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.