Package proguard.evaluation
Class ConstantValueFactory
- java.lang.Object
-
- proguard.evaluation.ConstantValueFactory
-
- All Implemented Interfaces:
ConstantVisitor
- Direct Known Subclasses:
ClassConstantValueFactory
public class ConstantValueFactory extends java.lang.Object implements ConstantVisitor
This class createsValue
instances that correspond to specified constant pool entries.
-
-
Field Summary
Fields Modifier and Type Field Description protected Value
value
protected ValueFactory
valueFactory
-
Constructor Summary
Constructors Constructor Description ConstantValueFactory(ValueFactory valueFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Value
constantValue(Clazz clazz, int constantIndex)
Returns the Value of the constant pool element at the given index.void
visitClassConstant(Clazz clazz, ClassConstant classConstant)
void
visitDoubleConstant(Clazz clazz, DoubleConstant doubleConstant)
void
visitDynamicConstant(Clazz clazz, DynamicConstant dynamicConstant)
void
visitFloatConstant(Clazz clazz, FloatConstant floatConstant)
void
visitIntegerConstant(Clazz clazz, IntegerConstant integerConstant)
void
visitLongConstant(Clazz clazz, LongConstant longConstant)
void
visitMethodHandleConstant(Clazz clazz, MethodHandleConstant methodHandleConstant)
void
visitMethodTypeConstant(Clazz clazz, MethodTypeConstant methodTypeConstant)
void
visitPrimitiveArrayConstant(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant)
void
visitStringConstant(Clazz clazz, StringConstant stringConstant)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface proguard.classfile.constant.visitor.ConstantVisitor
visitAnyConstant, visitAnyMethodrefConstant, visitAnyRefConstant, visitFieldrefConstant, visitInterfaceMethodrefConstant, visitInvokeDynamicConstant, visitMethodrefConstant, visitModuleConstant, visitNameAndTypeConstant, visitPackageConstant, visitUtf8Constant
-
-
-
-
Field Detail
-
valueFactory
protected final ValueFactory valueFactory
-
value
protected Value value
-
-
Constructor Detail
-
ConstantValueFactory
public ConstantValueFactory(ValueFactory valueFactory)
-
-
Method Detail
-
constantValue
public Value constantValue(Clazz clazz, int constantIndex)
Returns the Value of the constant pool element at the given index.
-
visitIntegerConstant
public void visitIntegerConstant(Clazz clazz, IntegerConstant integerConstant)
- Specified by:
visitIntegerConstant
in interfaceConstantVisitor
-
visitLongConstant
public void visitLongConstant(Clazz clazz, LongConstant longConstant)
- Specified by:
visitLongConstant
in interfaceConstantVisitor
-
visitFloatConstant
public void visitFloatConstant(Clazz clazz, FloatConstant floatConstant)
- Specified by:
visitFloatConstant
in interfaceConstantVisitor
-
visitDoubleConstant
public void visitDoubleConstant(Clazz clazz, DoubleConstant doubleConstant)
- Specified by:
visitDoubleConstant
in interfaceConstantVisitor
-
visitPrimitiveArrayConstant
public void visitPrimitiveArrayConstant(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant)
- Specified by:
visitPrimitiveArrayConstant
in interfaceConstantVisitor
-
visitStringConstant
public void visitStringConstant(Clazz clazz, StringConstant stringConstant)
- Specified by:
visitStringConstant
in interfaceConstantVisitor
-
visitDynamicConstant
public void visitDynamicConstant(Clazz clazz, DynamicConstant dynamicConstant)
- Specified by:
visitDynamicConstant
in interfaceConstantVisitor
-
visitMethodHandleConstant
public void visitMethodHandleConstant(Clazz clazz, MethodHandleConstant methodHandleConstant)
- Specified by:
visitMethodHandleConstant
in interfaceConstantVisitor
-
visitClassConstant
public void visitClassConstant(Clazz clazz, ClassConstant classConstant)
- Specified by:
visitClassConstant
in interfaceConstantVisitor
-
visitMethodTypeConstant
public void visitMethodTypeConstant(Clazz clazz, MethodTypeConstant methodTypeConstant)
- Specified by:
visitMethodTypeConstant
in interfaceConstantVisitor
-
-