| Package | Description |
|---|---|
| proguard.backport | |
| proguard.classfile.attribute |
This package contains classes to represent the attributes inside class files.
|
| proguard.classfile.attribute.visitor |
This package contains visitors for attributes and their components.
|
| proguard.classfile.editor |
This package contains visitors to edit byte code.
|
| proguard.classfile.instruction |
This package contains classes to represent Java bytecode instructions.
|
| proguard.classfile.instruction.visitor |
This package contains visitors for instructions.
|
| proguard.classfile.util |
This package contains utility classes for processing class files.
|
| proguard.classfile.visitor |
This package contains interfaces and classes for processing class files from
the
package using
the visitor pattern. |
| proguard.configuration | |
| proguard.evaluation | |
| proguard.optimize |
This package contains visitors that assist with various optimizations of byte
code.
|
| proguard.optimize.evaluation |
This package contains visitors that perform partial evaluation and subsequent
optimizations on byte code.
|
| proguard.optimize.gson |
This package contains classes for optimizing usages of the Gson library for serializing and deserialing Json.
|
| proguard.optimize.info |
This package contains classes to collect additional information about classes
and class members, which can then be used for optimization.
|
| proguard.optimize.peephole |
This package contains visitors that perform various peephole optimizations.
|
| proguard.preverify | |
| proguard.shrink |
This package contains classes to perform shrinking of class files.
|
| Modifier and Type | Class and Description |
|---|---|
class |
JSR310Converter
This ClassVisitor will replace any occurrence of java.time.** related methods / types
that have been introduced in Java 8 to the threetenbp library.
|
class |
LambdaExpressionConverter
This ClassVisitor converts all lambda expressions in the visited
classes to anonymous inner classes.
|
class |
StreamSupportConverter
This ClassVisitor will replace any occurrence of stream related methods / types
that have been introduced in Java 8 to the streamsupport library.
|
class |
StringConcatenationConverter
This InstructionVisitor converts all indy String Concatenations in the visited
classes to StringBuilder-append chains.
|
| Constructor and Description |
|---|
JSR310Converter(ClassPool programClassPool,
ClassPool libraryClassPool,
WarningPrinter warningPrinter,
ClassVisitor modifiedClassVisitor,
InstructionVisitor extraInstructionVisitor)
Create a new JSR310Converter instance.
|
StreamSupportConverter(ClassPool programClassPool,
ClassPool libraryClassPool,
WarningPrinter warningPrinter,
ClassVisitor modifiedClassVisitor,
InstructionVisitor extraInstructionVisitor)
Create a new StreamSupportConverter instance.
|
StringConcatenationConverter(InstructionVisitor extraInstructionVisitor,
CodeAttributeEditor codeAttributeEditor) |
| Modifier and Type | Method and Description |
|---|---|
void |
CodeAttribute.instructionAccept(Clazz clazz,
Method method,
int offset,
InstructionVisitor instructionVisitor)
Applies the given instruction visitor to the instruction at the specified
offset.
|
void |
CodeAttribute.instructionsAccept(Clazz clazz,
Method method,
InstructionVisitor instructionVisitor)
Applies the given instruction visitor to all instructions.
|
void |
CodeAttribute.instructionsAccept(Clazz clazz,
Method method,
int startOffset,
int endOffset,
InstructionVisitor instructionVisitor)
Applies the given instruction visitor to all instructions in the
specified range of offsets.
|
| Modifier and Type | Class and Description |
|---|---|
class |
InstructionToAttributeVisitor
This InstructionVisitor delegates to a given AttributeVisitor.
|
class |
StackSizeComputer
This AttributeVisitor computes the stack sizes at all instruction offsets
of the code attributes that it visits.
|
| Modifier and Type | Class and Description |
|---|---|
class |
BootstrapMethodsAttributeShrinker
This ClassVisitor removes all unused entries from the bootstrap method attribute.
|
class |
BridgeMethodFixer
This MemberVisitor fixes all inappropriate bridge access flags of the
program methods that it visits, checking whether the methods to which they
bridge have the same name.
|
class |
CodeAttributeComposer
This AttributeVisitor accumulates instructions and exceptions, and then
copies them into code attributes that it visits.
|
class |
CodeAttributeEditor
This AttributeVisitor accumulates specified changes to code, and then applies
these accumulated changes to the code attributes that it visits.
|
class |
ConstantPoolRemapper
This ClassVisitor remaps all possible references to constant pool entries
of the classes that it visits, based on a given index map.
|
class |
ConstantPoolShrinker
This ClassVisitor removes all unused entries from the constant pool.
|
class |
InstructionAdder
This InstructionVisitor adds all instructions that it visits to the given
target code attribute.
|
class |
InstructionWriter
This InstructionVisitor writes out the instructions that it visits,
collecting instructions that have to be widened.
|
class |
MethodInvocationFixer
This AttributeVisitor fixes all inappropriate special/virtual/static/interface
invocations of the code attributes that it visits.
|
class |
VariableRemapper
This AttributeVisitor remaps variable indexes in all attributes that it
visits, based on a given index map.
|
class |
VariableSizeUpdater
This AttributeVisitor computes and updates the maximum local variable frame
size of the code attributes that it visits.
|
| Modifier and Type | Method and Description |
|---|---|
void |
CodeAttributeEditor.Label.accept(Clazz clazz,
Method method,
CodeAttribute codeAttribute,
int offset,
InstructionVisitor instructionVisitor) |
| Modifier and Type | Method and Description |
|---|---|
void |
ConstantInstruction.accept(Clazz clazz,
Method method,
CodeAttribute codeAttribute,
int offset,
InstructionVisitor instructionVisitor) |
void |
LookUpSwitchInstruction.accept(Clazz clazz,
Method method,
CodeAttribute codeAttribute,
int offset,
InstructionVisitor instructionVisitor) |
void |
TableSwitchInstruction.accept(Clazz clazz,
Method method,
CodeAttribute codeAttribute,
int offset,
InstructionVisitor instructionVisitor) |
void |
VariableInstruction.accept(Clazz clazz,
Method method,
CodeAttribute codeAttribute,
int offset,
InstructionVisitor instructionVisitor) |
abstract void |
Instruction.accept(Clazz clazz,
Method method,
CodeAttribute codeAttribute,
int offset,
InstructionVisitor instructionVisitor)
Accepts the given visitor.
|
void |
BranchInstruction.accept(Clazz clazz,
Method method,
CodeAttribute codeAttribute,
int offset,
InstructionVisitor instructionVisitor) |
void |
SimpleInstruction.accept(Clazz clazz,
Method method,
CodeAttribute codeAttribute,
int offset,
InstructionVisitor instructionVisitor) |
| Modifier and Type | Class and Description |
|---|---|
class |
InstructionConstantVisitor
This AttributeVisitor lets a given ConstantVisitor visit all constants
of the instructions it visits.
|
class |
InstructionCounter
This InstructionVisitor counts the number of instructions that has been visited.
|
class |
MultiInstructionVisitor
This InstructionVisitor delegates all visits to each InstructionVisitor
in a given list.
|
| Modifier and Type | Method and Description |
|---|---|
void |
MultiInstructionVisitor.addInstructionVisitor(InstructionVisitor instructionVisitor) |
| Constructor and Description |
|---|
AllInstructionVisitor(InstructionVisitor instructionVisitor) |
MultiInstructionVisitor(InstructionVisitor... instructionVisitors) |
| Modifier and Type | Class and Description |
|---|---|
class |
ArrayInitializationReplacer
This ClassVisitor replaces array initialization instructions with optimized
primitive array constants.
|
class |
DynamicClassReferenceInitializer
This InstructionVisitor initializes any constant
Class.forName or
.class references of all classes it visits. |
class |
DynamicMemberReferenceInitializer
This AttributeVisitor initializes any constant class member references of all
code that it visits.
|
class |
EnumFieldReferenceInitializer
This ElementValueVisitor initializes the field references of the
EnumConstantElementValue instances that it visits.
|
class |
InstructionSequenceMatcher
This InstructionVisitor checks whether a given pattern instruction sequence
occurs in the instructions that are visited.
|
class |
PrimitiveArrayConstantReplacer
This ClassVisitor replaces all PrimitiveArray constants by Java bytecode
compliant array store instructions.
|
| Modifier and Type | Class and Description |
|---|---|
class |
ClassPrinter
This
ClassVisitor prints out the complete internal
structure of the classes it visits. |
class |
ConstructorMethodFilter
This MemberVisitor delegates its visits to one of three delegates, depending on whether the visited method is:
- a constructor
- a constructor that calls a super constructor
- or another method.
|
class |
DotClassClassVisitor
This InstructionVisitor lets a given
ClassVisitor visit all
classes involved in any .class constructs that it visits. |
| Modifier and Type | Class and Description |
|---|---|
class |
ConfigurationLoggingAdder
This class can add configuration debug logging code to all code that
relies on reflection.
|
class |
ConfigurationLoggingInstructionSequenceReplacer
This InstructionSequencesReplacer appends logging instructions to all
instructions calling reflection methods.
|
class |
ConfigurationLoggingInstructionSequencesReplacer
This InstructionSequencesReplacer appends logging instructions to all
instructions calling reflection methods.
|
| Constructor and Description |
|---|
ConfigurationLoggingInstructionSequenceReplacer(Constant[] patternConstants,
Instruction[] patternInstructions,
Constant[] replacementConstants,
Instruction[] replacementInstructions,
BranchTargetFinder branchTargetFinder,
CodeAttributeEditor codeAttributeEditor,
InstructionVisitor extraInstructionVisitor) |
ConfigurationLoggingInstructionSequenceReplacer(InstructionSequenceMatcher instructionSequenceMatcher,
Constant[] patternConstants,
Instruction[] patternInstructions,
Constant[] replacementConstants,
Instruction[] replacementInstructions,
BranchTargetFinder branchTargetFinder,
CodeAttributeEditor codeAttributeEditor,
InstructionVisitor extraInstructionVisitor) |
ConfigurationLoggingInstructionSequencesReplacer(Constant[] constants,
Instruction[][][] instructionSequences,
BranchTargetFinder branchTargetFinder,
CodeAttributeEditor codeAttributeEditor,
InstructionVisitor extraInstructionVisitor)
Creates a new ConfigurationLoggingInstructionSequencesReplacer.
|
| Modifier and Type | Class and Description |
|---|---|
class |
Processor
This InstructionVisitor executes the instructions that it visits on a given
local variable frame and stack.
|
| Modifier and Type | Class and Description |
|---|---|
class |
DuplicateInitializerInvocationFixer
This AttributeVisitor adds an additional integer parameter to the tweaked
initialization method invocations that it visits.
|
class |
TailRecursionSimplifier
This MemberVisitor simplifies tail recursion calls in all methods that it
visits.
|
| Constructor and Description |
|---|
DuplicateInitializerInvocationFixer(InstructionVisitor extraAddedInstructionVisitor)
Creates a new DuplicateInitializerInvocationFixer.
|
TailRecursionSimplifier(InstructionVisitor extraTailRecursionVisitor)
Creates a new TailRecursionSimplifier with an extra visitor.
|
| Modifier and Type | Class and Description |
|---|---|
class |
EvaluationSimplifier
This AttributeVisitor simplifies the code attributes that it visits, based
on partial evaluation.
|
class |
InitializationFinder
This AttributeVisitor links 'new' instructions and their corresponding
initializers in the CodeAttribute objects that it visits.
|
class |
LivenessAnalyzer
This AttributeVisitor analyzes the liveness of the variables in the code
attributes that it visits, based on partial evaluation.
|
class |
ReferenceTracingValueFactory
This ValueFactory tags newly created reference values so they can be traced
throughout the execution of a method.
|
class |
SimpleEnumClassSimplifier
This ClassVisitor simplifies the classes that it visits to simple enums.
|
class |
SimpleEnumUseChecker
This ClassVisitor marks enums that can't be simplified due to the way they
are used in the classes that it visits.
|
class |
SimpleEnumUseSimplifier
This AttributeVisitor simplifies the use of enums in the code attributes that
it visits.
|
| Modifier and Type | Method and Description |
|---|---|
InstructionVisitor |
InstructionUsageMarker.necessaryInstructionFilter(boolean necessary,
InstructionVisitor instructionVisitor)
Returns a filtering version of the given instruction visitor that only
visits necessary or unnecessary instructions.
|
InstructionVisitor |
InstructionUsageMarker.necessaryInstructionFilter(InstructionVisitor instructionVisitor)
Returns a filtering version of the given instruction visitor that only
visits necessary instructions.
|
InstructionVisitor |
InstructionUsageMarker.tracedInstructionFilter(boolean traced,
InstructionVisitor instructionVisitor)
Returns a filtering version of the given instruction visitor that only
visits traced or untraced instructions.
|
InstructionVisitor |
PartialEvaluator.tracedInstructionFilter(boolean traced,
InstructionVisitor instructionVisitor)
Returns a filtering version of the given instruction visitor that only
visits traced or untraced instructions.
|
InstructionVisitor |
InstructionUsageMarker.tracedInstructionFilter(InstructionVisitor instructionVisitor)
Returns a filtering version of the given instruction visitor that only
visits traced instructions.
|
InstructionVisitor |
PartialEvaluator.tracedInstructionFilter(InstructionVisitor instructionVisitor)
Returns a filtering version of the given instruction visitor that only
visits traced instructions.
|
| Modifier and Type | Method and Description |
|---|---|
InstructionVisitor |
InstructionUsageMarker.necessaryInstructionFilter(boolean necessary,
InstructionVisitor instructionVisitor)
Returns a filtering version of the given instruction visitor that only
visits necessary or unnecessary instructions.
|
InstructionVisitor |
InstructionUsageMarker.necessaryInstructionFilter(InstructionVisitor instructionVisitor)
Returns a filtering version of the given instruction visitor that only
visits necessary instructions.
|
InstructionVisitor |
InstructionUsageMarker.tracedInstructionFilter(boolean traced,
InstructionVisitor instructionVisitor)
Returns a filtering version of the given instruction visitor that only
visits traced or untraced instructions.
|
InstructionVisitor |
PartialEvaluator.tracedInstructionFilter(boolean traced,
InstructionVisitor instructionVisitor)
Returns a filtering version of the given instruction visitor that only
visits traced or untraced instructions.
|
InstructionVisitor |
InstructionUsageMarker.tracedInstructionFilter(InstructionVisitor instructionVisitor)
Returns a filtering version of the given instruction visitor that only
visits traced instructions.
|
InstructionVisitor |
PartialEvaluator.tracedInstructionFilter(InstructionVisitor instructionVisitor)
Returns a filtering version of the given instruction visitor that only
visits traced instructions.
|
| Constructor and Description |
|---|
EvaluationShrinker(InstructionUsageMarker instructionUsageMarker,
boolean runInstructionUsageMarker,
InstructionVisitor extraDeletedInstructionVisitor,
InstructionVisitor extraAddedInstructionVisitor)
Creates a new EvaluationShrinker.
|
EvaluationShrinker(PartialEvaluator partialEvaluator,
boolean runPartialEvaluator,
InstructionVisitor extraDeletedInstructionVisitor,
InstructionVisitor extraAddedInstructionVisitor)
Creates a new EvaluationShrinker.
|
EvaluationSimplifier(PartialEvaluator partialEvaluator,
InstructionVisitor extraInstructionVisitor)
Creates a new EvaluationSimplifier.
|
PartialEvaluator(ValueFactory valueFactory,
InvocationUnit invocationUnit,
boolean evaluateAllCode,
InstructionVisitor extraInstructionVisitor)
Creates a new PartialEvaluator.
|
SimpleEnumUseSimplifier(PartialEvaluator partialEvaluator,
InstructionVisitor extraInstructionVisitor)
Creates a new SimpleEnumDescriptorSimplifier.
|
| Modifier and Type | Class and Description |
|---|---|
class |
GsonBuilderInvocationFinder
This instructor visitor searches for invocations to GsonBuilder and keeps
track of which parameters of the GsonBuilder are being utilized in the code
in a GsonRuntimeSettings instance.
|
class |
GsonConstructorPatcher
Class visitor that patches the constructor of Gson so that the injected
optimized type adapter factory is registered at the right priority.
|
class |
GsonDeserializationInvocationFinder
This instruction visitor searches the code for invocations to any of the
deserialization methods of Gson (all the fromJson variants) and keeps
track of the domain classes that are involved in the deserialization.
|
class |
GsonInstrumentationAdder
Instruction visitor that adds some instrumentation code to the Gson.toJson()
and Gson.fromJson() methods that prints out the type adapter cache.
|
class |
GsonSerializationInvocationFinder
This instruction visitor searches the code for invocations to any of the
serialization methods of Gson (all the toJson variants) and keeps
track of the domain classes that are involved in the serialization.
|
class |
OptimizedTypeAdapterFactoryInitializer
This visitor implements the getType() method of the injected
_OptimizedTypeAdapterFactory.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AccessMethodMarker
This InstructionVisitor marks the types of class accesses and class member
accesses of the methods whose instructions it visits.
|
class |
BackwardBranchMarker
This InstructionVisitor marks all methods that branch backward in any of the
instructions that it visits.
|
class |
DotClassMarker
This InstructionVisitor marks all classes that are used in a .class
construct by any of the instructions that it visits.
|
class |
DynamicInvocationMarker
This InstructionVisitor marks whether the methods whose instructions it
visits contain the invokedynamic instruction.
|
class |
EscapingClassMarker
This AttributeVisitor marks the classes that are escaping from the visited
code attributes.
|
class |
ExceptionInstructionChecker
This class can tell whether an instruction might throw exceptions.
|
class |
FinalFieldAssignmentMarker
This InstructionVisitor marks whether a final field is assigned
in the methods whose instructions it visits.
|
class |
InstanceofClassMarker
This InstructionVisitor marks all classes that are used in an 'instanceof'
test by any of the instructions that it visits.
|
class |
InstantiationClassMarker
This InstructionVisitor marks all classes that are instantiated by any of
the instructions that it visits.
|
class |
MethodInvocationMarker
This InstructionVisitor counts the number of times methods are invoked from
the instructions that are visited.
|
class |
NonEmptyStackReturnMarker
This InstructionVisitor marks all methods that return with a non-empty stack
(other than the return value).
|
class |
ParameterEscapedMarker
This ClassPoolVisitor marks the reference parameters that have escaped or
that are escaping, outside or inside their methods.
|
class |
ParameterEscapeMarker
This MemberVisitor, AttributeVisitor, and InstructionVisitor marks the
reference parameters that are escaping, that are modified, or that are
returned.
|
class |
ParameterUsageMarker
This MemberVisitor counts the parameters and marks the used parameters
of the methods that it visits.
|
class |
ReadWriteFieldMarker
This InstructionVisitor marks all fields that are write-only.
|
class |
ReferenceEscapeChecker
This AttributeVisitor can tell whether reference parameters and instances
are escaping, are modified, or are returned.
|
class |
SideEffectInstructionChecker
This class can tell whether an instruction has any side effects.
|
class |
SideEffectMethodMarker
This MemberVisitor and InstructionVisitor marks all methods and classes
that have side effects.
|
class |
SuperInvocationMarker
This InstructionVisitor marks all methods that invoke super methods (other
than initializers) from the instructions that it visits.
|
class |
SynchronizedBlockMethodMarker
This InstructionVisitor marks the existence of synchronized blocks
of the methods whose instructions it visits.
|
class |
VariableUsageMarker
This AttributeVisitor marks the local variables that are used in the code
attributes that it visits.
|
| Modifier and Type | Class and Description |
|---|---|
class |
BranchTargetFinder
This AttributeVisitor finds all instruction offsets, branch targets, and
exception targets in the CodeAttribute objects that it visits.
|
class |
GotoCommonCodeReplacer
This AttributeVisitor redirects unconditional branches so any common code
is shared, and the code preceding the branch can be removed, in the code
attributes that it visits.
|
class |
GotoGotoReplacer
This InstructionVisitor simplifies unconditional branches to other
unconditional branches.
|
class |
GotoReturnReplacer
This InstructionVisitor replaces unconditional branches to return instructions
by these same return instructions.
|
class |
InstructionSequenceReplacer
This InstructionVisitor replaces a given pattern instruction sequence by
another given replacement instruction sequence.
|
class |
InstructionSequencesReplacer
This InstructionVisitor replaces multiple instruction sequences at once.
|
class |
MethodInliner
This AttributeVisitor inlines short methods or methods that are only invoked
once, in the code attributes that it visits.
|
class |
NopRemover
This InstructionVisitor removes all nop instructions that it encounters.
|
class |
ReachableCodeMarker
This AttributeVisitor finds all instruction offsets, branch targets, and
exception targets in the CodeAttribute objects that it visits.
|
class |
UnreachableCodeRemover
This InstructionVisitor deletes blocks of code that can never be reached by
regular calls or branches.
|
class |
WrapperClassUseSimplifier
This AttributeVisitor simplifies the use of retargeted wrapper classes in
the code attributes that it visits.
|
| Modifier and Type | Method and Description |
|---|---|
void |
InstructionSequenceReplacer.Label.accept(Clazz clazz,
Method method,
CodeAttribute codeAttribute,
int offset,
InstructionVisitor instructionVisitor) |
| Constructor and Description |
|---|
GotoCommonCodeReplacer(InstructionVisitor extraInstructionVisitor)
Creates a new GotoCommonCodeReplacer.
|
GotoGotoReplacer(CodeAttributeEditor codeAttributeEditor,
InstructionVisitor extraInstructionVisitor)
Creates a new GotoGotoReplacer.
|
GotoReturnReplacer(CodeAttributeEditor codeAttributeEditor,
InstructionVisitor extraInstructionVisitor)
Creates a new GotoReturnReplacer.
|
InstructionSequenceReplacer(Constant[] patternConstants,
Instruction[] patternInstructions,
Constant[] replacementConstants,
Instruction[] replacementInstructions,
BranchTargetFinder branchTargetFinder,
CodeAttributeEditor codeAttributeEditor,
InstructionVisitor extraInstructionVisitor)
Creates a new InstructionSequenceReplacer.
|
InstructionSequenceReplacer(InstructionSequenceMatcher instructionSequenceMatcher,
Constant[] patternConstants,
Instruction[] patternInstructions,
Constant[] replacementConstants,
Instruction[] replacementInstructions,
BranchTargetFinder branchTargetFinder,
CodeAttributeEditor codeAttributeEditor,
InstructionVisitor extraInstructionVisitor)
Creates a new InstructionSequenceReplacer.
|
InstructionSequencesReplacer(Constant[] constants,
Instruction[][][] instructionSequences,
BranchTargetFinder branchTargetFinder,
CodeAttributeEditor codeAttributeEditor,
InstructionVisitor extraInstructionVisitor)
Creates a new InstructionSequenceReplacer.
|
MethodInliner(boolean microEdition,
boolean android,
boolean allowAccessModification,
boolean inlineSingleInvocations,
InstructionVisitor extraInlinedInvocationVisitor)
Creates a new MethodInliner.
|
NopRemover(CodeAttributeEditor codeAttributeEditor,
InstructionVisitor extraInstructionVisitor)
Creates a new NopRemover.
|
PeepholeOptimizer(BranchTargetFinder branchTargetFinder,
CodeAttributeEditor codeAttributeEditor,
InstructionVisitor instructionVisitor)
Creates a new PeepholeOptimizer.
|
PeepholeOptimizer(CodeAttributeEditor codeAttributeEditor,
InstructionVisitor instructionVisitor)
Creates a new PeepholeOptimizer.
|
UnreachableCodeRemover(InstructionVisitor extraInstructionVisitor)
Creates a new UnreachableCodeRemover.
|
WrapperClassUseSimplifier(InstructionVisitor extraInstructionVisitor)
Creates a new WrapperClassUseSimplifier.
|
| Modifier and Type | Class and Description |
|---|---|
class |
CodeSubroutineInliner
This AttributeVisitor inlines local subroutines (jsr/ret) in the code
attributes that it visits.
|
| Modifier and Type | Class and Description |
|---|---|
class |
ShortestUsageMarker
This ClassVisitor and MemberVisitor recursively marks all classes
and class elements that are being used.
|
Copyright © 2019. All rights reserved.