|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface HClassMutator
An HClassMutator allows you to change members and
properties of an HClass.
HClass.getMutator()| Method Detail |
|---|
HField addDeclaredField(String name,
HClass type)
throws DuplicateMemberException
HFieldMutator to set the modifiers for the added
field.
name - name of the added fieldtype - type of the added field
DuplicateMemberExceptionHFieldMutator
HField addDeclaredField(String name,
String descriptor)
throws DuplicateMemberException
HFieldMutator to set the modifiers for the added
field.
name - name of the added fielddescriptor - descriptor for the type of the added field,
formatted as specified in
Section 4.3 of the JVM specification.
DuplicateMemberExceptionHFieldMutator
HField addDeclaredField(String name,
HField template)
throws DuplicateMemberException
name to the underlying
class. The type and the modifiers are taken from
template.
DuplicateMemberException
void removeDeclaredField(HField f)
throws NoSuchMemberException
NoSuchMemberException
HInitializer addClassInitializer()
throws DuplicateMemberException
DuplicateMemberException
void removeClassInitializer(HInitializer m)
throws NoSuchMemberException
NoSuchMemberException
HConstructor addConstructor(String descriptor)
throws DuplicateMemberException
DuplicateMemberException
HConstructor addConstructor(HClass[] paramTypes)
throws DuplicateMemberException
DuplicateMemberException
HConstructor addConstructor(HConstructor template)
throws DuplicateMemberException
DuplicateMemberException
void removeConstructor(HConstructor c)
throws NoSuchMemberException
NoSuchMemberException
HMethod addDeclaredMethod(String name,
String descriptor)
throws DuplicateMemberException
HClass. Use
HMethodMutator to set the method modifiers
(public, static etc.)
name - name of the added methoddescriptor - descriptor for the type of
the added method, as specified
in Section 4.3 of the JVM specification.
DuplicateMemberExceptionHMethodMutator
HMethod addDeclaredMethod(String name,
HClass[] paramTypes,
HClass returnType)
throws DuplicateMemberException
HClass. Later,
you can use HMethodMutator to set the method
modifiers (public, static etc.)
name - name of the added methodparamTypes - parameter types for the added methodreturnType - return type for the added method
DuplicateMemberExceptionHMethodMutator
HMethod addDeclaredMethod(String name,
HMethod template)
throws DuplicateMemberException
name to the underlying
HClass. The method type and modifiers are taken
from template.
DuplicateMemberException
void removeDeclaredMethod(HMethod m)
throws NoSuchMemberException
NoSuchMemberExceptionvoid addInterface(HClass in)
void removeInterface(HClass in)
throws NoSuchClassException
NoSuchClassExceptionvoid removeAllInterfaces()
void addModifiers(int m)
void setModifiers(int m)
void removeModifiers(int m)
void setSuperclass(HClass sc)
void setSourceFile(String sourcefilename)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||