|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectproguard.classfile.editor.ConstantAdder
public class ConstantAdder
This ConstantVisitor adds all constants that it visits to the constant pool of a given target class.
| Constructor Summary | |
|---|---|
ConstantAdder(ProgramClass targetClass)
Creates a new ConstantAdder that will copy constants into the given target class. |
|
| Method Summary | |
|---|---|
int |
addConstant(Clazz clazz,
Constant constant)
Adds a copy of the given constant in the given class and returns its index. |
int |
addConstant(Clazz clazz,
int constantIndex)
Adds a copy of the specified constant in the given class and returns its index. |
int |
getConstantIndex()
Returns the index of the most recently created constant in the constant pool of the target class. |
void |
visitClassConstant(Clazz clazz,
ClassConstant classConstant)
|
void |
visitDoubleConstant(Clazz clazz,
DoubleConstant doubleConstant)
|
void |
visitFieldrefConstant(Clazz clazz,
FieldrefConstant fieldrefConstant)
|
void |
visitFloatConstant(Clazz clazz,
FloatConstant floatConstant)
|
void |
visitIntegerConstant(Clazz clazz,
IntegerConstant integerConstant)
|
void |
visitInterfaceMethodrefConstant(Clazz clazz,
InterfaceMethodrefConstant interfaceMethodrefConstant)
|
void |
visitLongConstant(Clazz clazz,
LongConstant longConstant)
|
void |
visitMethodrefConstant(Clazz clazz,
MethodrefConstant methodrefConstant)
|
void |
visitNameAndTypeConstant(Clazz clazz,
NameAndTypeConstant nameAndTypeConstant)
|
void |
visitStringConstant(Clazz clazz,
StringConstant stringConstant)
|
void |
visitUtf8Constant(Clazz clazz,
Utf8Constant utf8Constant)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConstantAdder(ProgramClass targetClass)
| Method Detail |
|---|
public int addConstant(Clazz clazz,
int constantIndex)
public int addConstant(Clazz clazz,
Constant constant)
public int getConstantIndex()
public void visitIntegerConstant(Clazz clazz,
IntegerConstant integerConstant)
visitIntegerConstant in interface ConstantVisitor
public void visitLongConstant(Clazz clazz,
LongConstant longConstant)
visitLongConstant in interface ConstantVisitor
public void visitFloatConstant(Clazz clazz,
FloatConstant floatConstant)
visitFloatConstant in interface ConstantVisitor
public void visitDoubleConstant(Clazz clazz,
DoubleConstant doubleConstant)
visitDoubleConstant in interface ConstantVisitor
public void visitStringConstant(Clazz clazz,
StringConstant stringConstant)
visitStringConstant in interface ConstantVisitor
public void visitUtf8Constant(Clazz clazz,
Utf8Constant utf8Constant)
visitUtf8Constant in interface ConstantVisitor
public void visitFieldrefConstant(Clazz clazz,
FieldrefConstant fieldrefConstant)
visitFieldrefConstant in interface ConstantVisitor
public void visitInterfaceMethodrefConstant(Clazz clazz,
InterfaceMethodrefConstant interfaceMethodrefConstant)
visitInterfaceMethodrefConstant in interface ConstantVisitor
public void visitMethodrefConstant(Clazz clazz,
MethodrefConstant methodrefConstant)
visitMethodrefConstant in interface ConstantVisitor
public void visitClassConstant(Clazz clazz,
ClassConstant classConstant)
visitClassConstant in interface ConstantVisitor
public void visitNameAndTypeConstant(Clazz clazz,
NameAndTypeConstant nameAndTypeConstant)
visitNameAndTypeConstant in interface ConstantVisitor
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||