|
JBoss Reflection 2.2.1.SP1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MutableClassInfo
A MutableClassInfo.
Field Summary |
---|
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 | |
---|---|
void |
addConstructor(MutableConstructorInfo mci)
Add a constructor |
void |
addField(MutableFieldInfo mfi)
Add a field |
void |
addMethod(MutableMethodInfo mmi)
Add a method |
MutableConstructorInfo |
createMutableConstructor(Body body)
Compiles the code included in the Body parameter and returns a MutableConstructorInfo representation of it. |
MutableConstructorInfo |
createMutableConstructor(int modifiers,
Body body,
ClassInfo[] parameters,
ClassInfo[] exceptions)
Creates a constructor with the parameters given. |
MutableConstructorInfo |
createMutableConstructor(int modifiers,
Body body,
String[] parameters,
String[] exceptions)
Creates a constructor with the parameters given. |
MutableConstructorInfo |
createMutableConstructor(int modifiers,
ClassInfo[] parameters,
ClassInfo[] exceptions)
Creates an empty constructor with the parameters given. |
MutableConstructorInfo |
createMutableConstructor(int modifiers,
String[] parameters,
String[] exceptions)
Creates an empty constructor with parameters given. |
MutableFieldInfo |
createMutableField(int modifiers,
ClassInfo type,
String name)
Creates a field connected to this class with the parameters given. |
MutableFieldInfo |
createMutableField(int modifiers,
String type,
String name)
Creates a field connected to this class with the parameters given. |
MutableMethodInfo |
createMutableMethod(Body body)
Compiles the code included in Body and returns a MutableMethodInfo representation of it. |
MutableMethodInfo |
createMutableMethod(int modifiers,
ClassInfo returnType,
String name,
Body body,
ClassInfo[] parameters,
ClassInfo[] exceptions)
Compiles a method with the signature and body given by the parameters. |
MutableMethodInfo |
createMutableMethod(int modifiers,
ClassInfo returnType,
String name,
ClassInfo[] parameters,
ClassInfo[] exceptions)
Compiles an empty method with the signature given by the parameters. |
MutableMethodInfo |
createMutableMethod(int modifiers,
String returnType,
String name,
Body body,
String[] parameters,
String[] exceptions)
Compiles a method with the signature and body given by the parameters. |
MutableMethodInfo |
createMutableMethod(int modifiers,
String returnType,
String name,
String[] parameters,
String[] exceptions)
Compiles an empty method with the signature given by the parameters. |
MutableConstructorInfo |
getDeclaredConstructor()
Gets the default constructor (parameterless) |
MutableConstructorInfo |
getDeclaredConstructor(String... parameters)
Get a declared constructor Note: the parameters will be loaded with the classloader defined in TypeInfoFactory. |
MutableConstructorInfo |
getDeclaredConstructor(TypeInfo... parameters)
Get a declared constructor |
MutableConstructorInfo[] |
getDeclaredConstructors()
Get the declared constructors |
MutableFieldInfo |
getDeclaredField(String name)
Get the declared field |
MutableFieldInfo[] |
getDeclaredFields()
Get the declared fields |
MutableMethodInfo |
getDeclaredMethod(String name)
Get the declared method without parameters. |
MutableMethodInfo |
getDeclaredMethod(String name,
String... parameters)
Get the declared method Note: the parameters will be loaded with the classloader defined in TypeInfoFactory. |
MutableMethodInfo |
getDeclaredMethod(String name,
TypeInfo... parameters)
Get the declared method |
MutableMethodInfo[] |
getDeclaredMethods()
Get the declared methods |
void |
removeConstructor(MutableConstructorInfo mci)
Remove the specified constructor from this class |
void |
removeField(MutableFieldInfo mfi)
Remove a field |
void |
removeMethod(MutableMethodInfo mmi)
Remove the specified method from this class |
byte[] |
toByteCode()
Converts the class to a Class file. |
Methods inherited from interface org.jboss.reflect.spi.ClassInfo |
---|
getActualTypeArguments, getComponentType, getGenericInterfaces, getGenericSuperclass, getInterfaces, getKeyType, getName, getOwnerType, getPackage, getRawType, getSuperclass, getTypeVariable, getValueType, isInterface |
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.ModifierInfo |
---|
getModifiers, isPublic, isStatic, isVolatile |
Methods inherited from interface org.jboss.reflect.spi.TypeInfo |
---|
convertValue, convertValue, convertValue, getArrayType, getAttachment, getAttachment, getClassLoader, getSimpleName, getType, getTypeInfoFactory, isAnnotation, isArray, isAssignableFrom, isCollection, isEnum, isInstance, isMap, isPrimitive, newArrayInstance, setAttachment |
Method Detail |
---|
MutableMethodInfo getDeclaredMethod(String name)
name
- the method name
MutableMethodInfo getDeclaredMethod(String name, TypeInfo... parameters)
getDeclaredMethod
in interface ClassInfo
name
- the method nameparameters
- the parameters
MutableMethodInfo getDeclaredMethod(String name, String... parameters) throws ClassNotFoundException
name
- the method nameparameters
- the parameters
ClassNotFoundException
MutableMethodInfo[] getDeclaredMethods()
getDeclaredMethods
in interface ClassInfo
MutableConstructorInfo[] getDeclaredConstructors()
getDeclaredConstructors
in interface ClassInfo
MutableConstructorInfo getDeclaredConstructor()
MutableConstructorInfo getDeclaredConstructor(TypeInfo... parameters)
getDeclaredConstructor
in interface ClassInfo
parameters
- the parameters
MutableConstructorInfo getDeclaredConstructor(String... parameters) throws ClassNotFoundException
parameters
- the parameters
ClassNotFoundException
MutableFieldInfo getDeclaredField(String name)
getDeclaredField
in interface ClassInfo
name
- the field name
MutableFieldInfo[] getDeclaredFields()
getDeclaredFields
in interface ClassInfo
MutableMethodInfo createMutableMethod(Body body)
body
- contains the entire declaration of the method, including its signature
MutableMethodInfo createMutableMethod(int modifiers, String returnType, String name, String[] parameters, String[] exceptions)
modifiers
- the modifiers of the method to be createdreturnType
- the return type of the method to be createdname
- the name of the method to be createdparameters
- the parameters of the method to be createdexceptions
- the exceptions that the method to be created declares to throw
MutableMethodInfo createMutableMethod(int modifiers, ClassInfo returnType, String name, ClassInfo[] parameters, ClassInfo[] exceptions)
modifiers
- the modifiers of the method to be createdreturnType
- the return type of the method to be createdname
- the name of the method to be createdparameters
- the parameters of the method to be createdexceptions
- the exceptions that the method to be created declares to throw
MutableMethodInfo createMutableMethod(int modifiers, String returnType, String name, Body body, String[] parameters, String[] exceptions)
{}
.
modifiers
- the modifiers of the method to be createdreturnType
- the return type of the method to be createdname
- the name of the method to be createdbody
- the body of the method to be createdparameters
- the parameters of the method to be createdexceptions
- the exceptions that the method to be created declares to throw
MutableMethodInfo createMutableMethod(int modifiers, ClassInfo returnType, String name, Body body, ClassInfo[] parameters, ClassInfo[] exceptions)
{}
.
modifiers
- the modifiers of the method to be createdreturnType
- the return type of the method to be createdname
- the name of the method to be createdbody
- the body of the method to be createdparameters
- the parameters of the method to be createdexceptions
- the exceptions that the method to be created declares to throw
MutableConstructorInfo createMutableConstructor(Body body)
body
- contains the code of the constructor to be created
MutableConstructorInfo createMutableConstructor(int modifiers, String[] parameters, String[] exceptions)
modifiers
- the modifiers of the constructor to be createdparameters
- the parameters of the constructor to be createdexceptions
- the exceptions that the constructor to be created declares to throw
MutableConstructorInfo createMutableConstructor(int modifiers, ClassInfo[] parameters, ClassInfo[] exceptions)
modifiers
- the modifiers of the constructor to be createdparameters
- the parameters of the constructor to be createdexceptions
- the exceptions that the constructor to be created declares to throw
MutableConstructorInfo createMutableConstructor(int modifiers, Body body, String[] parameters, String[] exceptions)
{}
.
modifiers
- the modifiers of the constructor to be createdbody
- the body of the constructor to be createdparameters
- the parameters of the constructor to be createdexceptions
- the exceptions that the constructor to be created declares to throw
MutableConstructorInfo createMutableConstructor(int modifiers, Body body, ClassInfo[] parameters, ClassInfo[] exceptions)
{}
.
modifiers
- the modifiers of the constructor to be createdbody
- the body of the constructor to be createdparameters
- the parameters of the constructor to be createdexceptions
- the exceptions that the constructor to be created declares to throw
MutableFieldInfo createMutableField(int modifiers, String type, String name)
modifiers
- the modifiers of the field to be createdtype
- the type of the field to be createdname
- the name of the field to be created
MutableFieldInfo createMutableField(int modifiers, ClassInfo type, String name)
modifiers
- the modifiers of the field to be createdtype
- the type of the field to be createdname
- the name of the field to be created
void addMethod(MutableMethodInfo mmi)
mmi
- void removeMethod(MutableMethodInfo mmi)
mmi
- void addConstructor(MutableConstructorInfo mci)
mci
- void removeConstructor(MutableConstructorInfo mci)
mci
- void addField(MutableFieldInfo mfi)
mfi
- void removeField(MutableFieldInfo mfi)
mfi
- byte[] toByteCode()
|
JBoss Reflection 2.2.1.SP1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |