public class MemberRemover extends java.lang.Object implements ClassVisitor, MemberVisitor
ProgramClass
.
It should be used in two steps:
For example, to remove all fields in a program class:
MemberRemover remover = new MemberRemover(); programClass.fieldsAccept(remover); programClass.accept(remover);
Constructor and Description |
---|
MemberRemover() |
Modifier and Type | Method and Description |
---|---|
void |
visitAnyClass(Clazz clazz)
Visits any Clazz instance.
|
void |
visitAnyMember(Clazz clazz,
Member member)
Visits any Member instance.
|
void |
visitProgramClass(ProgramClass programClass) |
void |
visitProgramField(ProgramClass programClass,
ProgramField programField) |
void |
visitProgramMethod(ProgramClass programClass,
ProgramMethod programMethod) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
visitLibraryClass
visitLibraryField, visitLibraryMember, visitLibraryMethod, visitProgramMember
public void visitAnyClass(Clazz clazz)
ClassVisitor
visitAnyClass
in interface ClassVisitor
public void visitProgramClass(ProgramClass programClass)
visitProgramClass
in interface ClassVisitor
public void visitAnyMember(Clazz clazz, Member member)
MemberVisitor
visitAnyMember
in interface MemberVisitor
public void visitProgramField(ProgramClass programClass, ProgramField programField)
visitProgramField
in interface MemberVisitor
public void visitProgramMethod(ProgramClass programClass, ProgramMethod programMethod)
visitProgramMethod
in interface MemberVisitor