proguard.classfile.editor.CodeAttributeEditor Java Examples

The following examples show how to use proguard.classfile.editor.CodeAttributeEditor. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: InstructionSequencesReplacer.java    From bazel with Apache License 2.0 6 votes vote down vote up
/**
 * Creates an array of InstructionSequenceReplacer instances.
 * @param patternConstants        any constants referenced by the pattern
 *                                instruction.
 * @param instructionSequences    the instruction sequences to be replaced,
 *                                with subsequently the sequence pair index,
 *                                the from/to index (0 or 1), and the
 *                                instruction index in the sequence.
 * @param branchTargetFinder      a branch target finder that has been
 *                                initialized to indicate branch targets
 *                                in the visited code.
 * @param codeAttributeEditor     a code editor that can be used for
 *                                accumulating changes to the code.
 * @param extraInstructionVisitor an optional extra visitor for all deleted
 *                                load instructions.
 */
private static InstructionVisitor[] createInstructionSequenceReplacers(Constant[]          patternConstants,
                                                                       Instruction[][][]   instructionSequences,
                                                                       BranchTargetFinder  branchTargetFinder,
                                                                       CodeAttributeEditor codeAttributeEditor,
                                                                       InstructionVisitor  extraInstructionVisitor)
{
    InstructionVisitor[] instructionSequenceReplacers =
        new InstructionSequenceReplacer[instructionSequences.length];

    for (int index = 0; index < instructionSequenceReplacers.length; index++)
    {
        Instruction[][] instructionSequencePair = instructionSequences[index];
        instructionSequenceReplacers[index] =
            new InstructionSequenceReplacer(patternConstants,
                                            instructionSequencePair[PATTERN_INDEX],
                                            instructionSequencePair[REPLACEMENT_INDEX],
                                            branchTargetFinder,
                                            codeAttributeEditor,
                                            extraInstructionVisitor);
    }

    return instructionSequenceReplacers;
}
 
Example #2
Source File: InstructionSequencesReplacer.java    From proguard with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Creates an array of InstructionSequenceReplacer instances.
 * @param patternConstants        any constants referenced by the pattern
 *                                instruction.
 * @param instructionSequences    the instruction sequences to be replaced,
 *                                with subsequently the sequence pair index,
 *                                the from/to index (0 or 1), and the
 *                                instruction index in the sequence.
 * @param branchTargetFinder      a branch target finder that has been
 *                                initialized to indicate branch targets
 *                                in the visited code.
 * @param codeAttributeEditor     a code editor that can be used for
 *                                accumulating changes to the code.
 * @param extraInstructionVisitor an optional extra visitor for all deleted
 *                                load instructions.
 */
private static InstructionVisitor[] createInstructionSequenceReplacers(Constant[]          patternConstants,
                                                                       Instruction[][][]   instructionSequences,
                                                                       BranchTargetFinder  branchTargetFinder,
                                                                       CodeAttributeEditor codeAttributeEditor,
                                                                       InstructionVisitor  extraInstructionVisitor)
{
    InstructionVisitor[] instructionSequenceReplacers =
        new InstructionSequenceReplacer[instructionSequences.length];

    for (int index = 0; index < instructionSequenceReplacers.length; index++)
    {
        Instruction[][] instructionSequencePair = instructionSequences[index];
        instructionSequenceReplacers[index] =
            new InstructionSequenceReplacer(patternConstants,
                                            instructionSequencePair[PATTERN_INDEX],
                                            instructionSequencePair[REPLACEMENT_INDEX],
                                            branchTargetFinder,
                                            codeAttributeEditor,
                                            extraInstructionVisitor);
    }

    return instructionSequenceReplacers;
}
 
Example #3
Source File: InstructionSequencesReplacer.java    From java-n-IDE-for-Android with Apache License 2.0 6 votes vote down vote up
/**
 * Creates an array of InstructionSequenceReplacer instances.
 * @param patternConstants        any constants referenced by the pattern
 *                                instruction.
 * @param instructionSequences    the instruction sequences to be replaced,
 *                                with subsequently the sequence pair index,
 *                                the from/to index (0 or 1), and the
 *                                instruction index in the sequence.
 * @param branchTargetFinder      a branch target finder that has been
 *                                initialized to indicate branch targets
 *                                in the visited code.
 * @param codeAttributeEditor     a code editor that can be used for
 *                                accumulating changes to the code.
 * @param extraInstructionVisitor an optional extra visitor for all deleted
 *                                load instructions.
 */
private static InstructionVisitor[] createInstructionSequenceReplacers(Constant[]          patternConstants,
                                                                       Instruction[][][]   instructionSequences,
                                                                       BranchTargetFinder  branchTargetFinder,
                                                                       CodeAttributeEditor codeAttributeEditor,
                                                                       InstructionVisitor extraInstructionVisitor)
{
    InstructionVisitor[] instructionSequenceReplacers =
        new InstructionSequenceReplacer[instructionSequences.length];

    for (int index = 0; index < instructionSequenceReplacers.length; index++)
    {
        Instruction[][] instructionSequencePair = instructionSequences[index];
        instructionSequenceReplacers[index] =
            new InstructionSequenceReplacer(patternConstants,
                                            instructionSequencePair[PATTERN_INDEX],
                                            instructionSequencePair[REPLACEMENT_INDEX],
                                            branchTargetFinder,
                                            codeAttributeEditor,
                                            extraInstructionVisitor);
    }

    return instructionSequenceReplacers;
}
 
Example #4
Source File: InstructionSequenceReplacer.java    From java-n-IDE-for-Android with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new InstructionSequenceReplacer.
 * @param patternConstants        any constants referenced by the pattern
 *                                instruction.
 * @param patternInstructions     the pattern instruction sequence.
 * @param replacementInstructions the replacement instruction sequence.
 * @param branchTargetFinder      a branch target finder that has been
 *                                initialized to indicate branch targets
 *                                in the visited code.
 * @param codeAttributeEditor     a code editor that can be used for
 *                                accumulating changes to the code.
 */
public InstructionSequenceReplacer(Constant[]          patternConstants,
                                   Instruction[]       patternInstructions,
                                   Instruction[]       replacementInstructions,
                                   BranchTargetFinder  branchTargetFinder,
                                   CodeAttributeEditor codeAttributeEditor)
{
    this(patternConstants,
         patternInstructions,
         replacementInstructions,
         branchTargetFinder,
         codeAttributeEditor,
         null);
}
 
Example #5
Source File: InstructionSequenceReplacer.java    From java-n-IDE-for-Android with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new InstructionSequenceReplacer.
 * @param patternConstants        any constants referenced by the pattern
 *                                instruction.
 * @param branchTargetFinder      a branch target finder that has been
 *                                initialized to indicate branch targets
 *                                in the visited code.
 * @param codeAttributeEditor     a code editor that can be used for
 *                                accumulating changes to the code.
 * @param extraInstructionVisitor an optional extra visitor for all deleted
 *                                load instructions.
 */
public InstructionSequenceReplacer(Constant[]          patternConstants,
                                   Instruction[]       patternInstructions,
                                   Instruction[]       replacementInstructions,
                                   BranchTargetFinder  branchTargetFinder,
                                   CodeAttributeEditor codeAttributeEditor,
                                   InstructionVisitor extraInstructionVisitor)
{
    this.instructionSequenceMatcher = new InstructionSequenceMatcher(patternConstants, patternInstructions);
    this.replacementInstructions    = replacementInstructions;
    this.branchTargetFinder         = branchTargetFinder;
    this.codeAttributeEditor        = codeAttributeEditor;
    this.extraInstructionVisitor    = extraInstructionVisitor;
}
 
Example #6
Source File: OptimizedTypeAdapterAdder.java    From proguard with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Creates a new OptimizedTypeAdapterAdder.
 *
 * @param programClassPool         the program class pool used for looking
 *                                 up references to program classes.
 * @param libraryClassPool         the library class pool used for looking
 *                                 up references to library classes.
 * @param codeAttributeEditor      the code attribute editor used for
 *                                 implementing the added type adapters.
 * @param serializationInfo        contains information on which classes
 *                                 and fields to serialize and how.
 * @param deserializationInfo      contains information on which classes
 *                                 and fields to deserialize and how.
 * @param extraDataEntryNameMap    map to which the names of new type
 *                                 adapter classes are added.
 * @param typeAdapterRegistry      the registry to which the corresponding
 *                                 type adapter class name is added for a
 *                                 given domain class name.
 * @param gsonRuntimeSettings      keeps track of all GsonBuilder invocations.
 */
public OptimizedTypeAdapterAdder(ClassPool             programClassPool,
                                 ClassPool             libraryClassPool,
                                 CodeAttributeEditor   codeAttributeEditor,
                                 OptimizedJsonInfo     serializationInfo,
                                 OptimizedJsonInfo     deserializationInfo,
                                 ExtraDataEntryNameMap extraDataEntryNameMap,
                                 Map<String, String>   typeAdapterRegistry,
                                 GsonRuntimeSettings   gsonRuntimeSettings)
{
    this.programClassPool      = programClassPool;
    this.libraryClassPool      = libraryClassPool;
    this.codeAttributeEditor   = codeAttributeEditor;
    this.serializationInfo     = serializationInfo;
    this.deserializationInfo   = deserializationInfo;
    this.extraDataEntryNameMap = extraDataEntryNameMap;
    this.typeAdapterRegistry   = typeAdapterRegistry;
    this.gsonRuntimeSettings   = gsonRuntimeSettings;
}
 
Example #7
Source File: NopRemover.java    From bazel with Apache License 2.0 3 votes vote down vote up
/**
 * Creates a new NopRemover.
 * @param codeAttributeEditor     a code editor that can be used for
 *                                accumulating changes to the code.
 * @param extraInstructionVisitor an optional extra visitor for all removed
 *                                nop instructions.
 */
public NopRemover(CodeAttributeEditor codeAttributeEditor,
                  InstructionVisitor  extraInstructionVisitor)
{
    this.codeAttributeEditor     = codeAttributeEditor;
    this.extraInstructionVisitor = extraInstructionVisitor;
}
 
Example #8
Source File: GotoGotoReplacer.java    From java-n-IDE-for-Android with Apache License 2.0 3 votes vote down vote up
/**
 * Creates a new GotoGotoReplacer.
 * @param codeAttributeEditor     a code editor that can be used for
 *                                accumulating changes to the code.
 * @param extraInstructionVisitor an optional extra visitor for all replaced
 *                                goto instructions.
 */
public GotoGotoReplacer(CodeAttributeEditor codeAttributeEditor,
                        InstructionVisitor extraInstructionVisitor)
{
    this.codeAttributeEditor     = codeAttributeEditor;
    this.extraInstructionVisitor = extraInstructionVisitor;
}
 
Example #9
Source File: InstructionSequencesReplacer.java    From proguard with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Creates a new InstructionSequencesReplacer.
 * @param patternConstants        any constants referenced by the pattern
 *                                instruction.
 * @param instructionSequences    the instruction sequences to be replaced,
 *                                with subsequently the sequence pair index,
 *                                the patten/replacement index (0 or 1),
 *                                and the instruction index in the sequence.
 * @param branchTargetFinder      a branch target finder that has been
 *                                initialized to indicate branch targets
 *                                in the visited code.
 * @param codeAttributeEditor     a code editor that can be used for
 *                                accumulating changes to the code.
 */
public InstructionSequencesReplacer(Constant[]          patternConstants,
                                    Instruction[][][]   instructionSequences,
                                    BranchTargetFinder  branchTargetFinder,
                                    CodeAttributeEditor codeAttributeEditor)
{
    this(patternConstants,
         instructionSequences,
         branchTargetFinder,
         codeAttributeEditor,
         null);
}
 
Example #10
Source File: InstructionSequencesReplacer.java    From proguard with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Creates a new InstructionSequenceReplacer.
 * @param patternConstants        any constants referenced by the pattern
 *                                instruction.
 * @param instructionSequences    the instruction sequences to be replaced,
 *                                with subsequently the sequence pair index,
 *                                the patten/replacement index (0 or 1),
 *                                and the instruction index in the sequence.
 * @param branchTargetFinder      a branch target finder that has been
 *                                initialized to indicate branch targets
 *                                in the visited code.
 * @param codeAttributeEditor     a code editor that can be used for
 *                                accumulating changes to the code.
 * @param extraInstructionVisitor an optional extra visitor for all deleted
 *                                load instructions.
 */
public InstructionSequencesReplacer(Constant[]          patternConstants,
                                    Instruction[][][]   instructionSequences,
                                    BranchTargetFinder  branchTargetFinder,
                                    CodeAttributeEditor codeAttributeEditor,
                                    InstructionVisitor  extraInstructionVisitor)
{
    super(createInstructionSequenceReplacers(patternConstants,
                                             instructionSequences,
                                             branchTargetFinder,
                                             codeAttributeEditor,
                                             extraInstructionVisitor));
}
 
Example #11
Source File: GotoReturnReplacer.java    From proguard with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Creates a new GotoReturnReplacer.
 * @param codeAttributeEditor     a code editor that can be used for
 *                                accumulating changes to the code.
 * @param extraInstructionVisitor an optional extra visitor for all replaced
 *                                goto instructions.
 */
public GotoReturnReplacer(CodeAttributeEditor codeAttributeEditor,
                          InstructionVisitor  extraInstructionVisitor)
{
    this.codeAttributeEditor     = codeAttributeEditor;
    this.extraInstructionVisitor = extraInstructionVisitor;
}
 
Example #12
Source File: PeepholeOptimizer.java    From proguard with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Creates a new PeepholeOptimizer.
 * @param branchTargetFinder  branch target finder that will be initialized
 *                            to indicate branch targets in the visited code.
 * @param codeAttributeEditor the code attribute editor that will be reset
 *                            and then executed.
 * @param instructionVisitor  the instruction visitor that performs
 *                            peephole optimizations using the above code
 *                            attribute editor.
 */
public PeepholeOptimizer(BranchTargetFinder  branchTargetFinder,
                         CodeAttributeEditor codeAttributeEditor,
                         InstructionVisitor  instructionVisitor)
{
    this.branchTargetFinder  = branchTargetFinder;
    this.codeAttributeEditor = codeAttributeEditor;
    this.instructionVisitor  = instructionVisitor;
}
 
Example #13
Source File: GotoGotoReplacer.java    From proguard with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Creates a new GotoGotoReplacer.
 * @param codeAttributeEditor     a code editor that can be used for
 *                                accumulating changes to the code.
 * @param extraInstructionVisitor an optional extra visitor for all replaced
 *                                goto instructions.
 */
public GotoGotoReplacer(CodeAttributeEditor codeAttributeEditor,
                        InstructionVisitor  extraInstructionVisitor)
{
    this.codeAttributeEditor     = codeAttributeEditor;
    this.extraInstructionVisitor = extraInstructionVisitor;
}
 
Example #14
Source File: NopRemover.java    From proguard with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Creates a new NopRemover.
 * @param codeAttributeEditor     a code editor that can be used for
 *                                accumulating changes to the code.
 * @param extraInstructionVisitor an optional extra visitor for all removed
 *                                nop instructions.
 */
public NopRemover(CodeAttributeEditor codeAttributeEditor,
                  InstructionVisitor  extraInstructionVisitor)
{
    this.codeAttributeEditor     = codeAttributeEditor;
    this.extraInstructionVisitor = extraInstructionVisitor;
}
 
Example #15
Source File: InstructionSequencesReplacer.java    From bazel with Apache License 2.0 3 votes vote down vote up
/**
 * Creates a new InstructionSequencesReplacer.
 * @param patternConstants        any constants referenced by the pattern
 *                                instruction.
 * @param instructionSequences    the instruction sequences to be replaced,
 *                                with subsequently the sequence pair index,
 *                                the patten/replacement index (0 or 1),
 *                                and the instruction index in the sequence.
 * @param branchTargetFinder      a branch target finder that has been
 *                                initialized to indicate branch targets
 *                                in the visited code.
 * @param codeAttributeEditor     a code editor that can be used for
 *                                accumulating changes to the code.
 */
public InstructionSequencesReplacer(Constant[]          patternConstants,
                                    Instruction[][][]   instructionSequences,
                                    BranchTargetFinder  branchTargetFinder,
                                    CodeAttributeEditor codeAttributeEditor)
{
    this(patternConstants,
         instructionSequences,
         branchTargetFinder,
         codeAttributeEditor,
         null);
}
 
Example #16
Source File: InstructionSequencesReplacer.java    From bazel with Apache License 2.0 3 votes vote down vote up
/**
 * Creates a new InstructionSequenceReplacer.
 * @param patternConstants        any constants referenced by the pattern
 *                                instruction.
 * @param instructionSequences    the instruction sequences to be replaced,
 *                                with subsequently the sequence pair index,
 *                                the patten/replacement index (0 or 1),
 *                                and the instruction index in the sequence.
 * @param branchTargetFinder      a branch target finder that has been
 *                                initialized to indicate branch targets
 *                                in the visited code.
 * @param codeAttributeEditor     a code editor that can be used for
 *                                accumulating changes to the code.
 * @param extraInstructionVisitor an optional extra visitor for all deleted
 *                                load instructions.
 */
public InstructionSequencesReplacer(Constant[]          patternConstants,
                                    Instruction[][][]   instructionSequences,
                                    BranchTargetFinder  branchTargetFinder,
                                    CodeAttributeEditor codeAttributeEditor,
                                    InstructionVisitor  extraInstructionVisitor)
{
    super(createInstructionSequenceReplacers(patternConstants,
                                             instructionSequences,
                                             branchTargetFinder,
                                             codeAttributeEditor,
                                             extraInstructionVisitor));
}
 
Example #17
Source File: GotoReturnReplacer.java    From bazel with Apache License 2.0 3 votes vote down vote up
/**
 * Creates a new GotoReturnReplacer.
 * @param codeAttributeEditor     a code editor that can be used for
 *                                accumulating changes to the code.
 * @param extraInstructionVisitor an optional extra visitor for all replaced
 *                                goto instructions.
 */
public GotoReturnReplacer(CodeAttributeEditor codeAttributeEditor,
                          InstructionVisitor  extraInstructionVisitor)
{
    this.codeAttributeEditor     = codeAttributeEditor;
    this.extraInstructionVisitor = extraInstructionVisitor;
}
 
Example #18
Source File: PeepholeOptimizer.java    From bazel with Apache License 2.0 3 votes vote down vote up
/**
 * Creates a new PeepholeOptimizer.
 * @param branchTargetFinder  branch target finder that will be initialized
 *                            to indicate branch targets in the visited code.
 * @param codeAttributeEditor the code attribute editor that will be reset
 *                            and then executed.
 * @param instructionVisitor  the instruction visitor that performs
 *                            peephole optimizations using the above code
 *                            attribute editor.
 */
public PeepholeOptimizer(BranchTargetFinder  branchTargetFinder,
                         CodeAttributeEditor codeAttributeEditor,
                         InstructionVisitor  instructionVisitor)
{
    this.branchTargetFinder  = branchTargetFinder;
    this.codeAttributeEditor = codeAttributeEditor;
    this.instructionVisitor  = instructionVisitor;
}
 
Example #19
Source File: GotoGotoReplacer.java    From bazel with Apache License 2.0 3 votes vote down vote up
/**
 * Creates a new GotoGotoReplacer.
 * @param codeAttributeEditor     a code editor that can be used for
 *                                accumulating changes to the code.
 * @param extraInstructionVisitor an optional extra visitor for all replaced
 *                                goto instructions.
 */
public GotoGotoReplacer(CodeAttributeEditor codeAttributeEditor,
                        InstructionVisitor  extraInstructionVisitor)
{
    this.codeAttributeEditor     = codeAttributeEditor;
    this.extraInstructionVisitor = extraInstructionVisitor;
}
 
Example #20
Source File: PeepholeOptimizer.java    From java-n-IDE-for-Android with Apache License 2.0 3 votes vote down vote up
/**
 * Creates a new PeepholeOptimizer.
 * @param branchTargetFinder  branch target finder that will be initialized
 *                            to indicate branch targets in the visited code.
 * @param codeAttributeEditor the code attribute editor that will be reset
 *                            and then executed.
 * @param instructionVisitor  the instruction visitor that performs
 *                            peephole optimizations using the above code
 *                            attribute editor.
 */
public PeepholeOptimizer(BranchTargetFinder  branchTargetFinder,
                         CodeAttributeEditor codeAttributeEditor,
                         InstructionVisitor instructionVisitor)
{
    this.branchTargetFinder  = branchTargetFinder;
    this.codeAttributeEditor = codeAttributeEditor;
    this.instructionVisitor  = instructionVisitor;
}
 
Example #21
Source File: GotoReturnReplacer.java    From java-n-IDE-for-Android with Apache License 2.0 3 votes vote down vote up
/**
 * Creates a new GotoReturnReplacer.
 * @param codeAttributeEditor     a code editor that can be used for
 *                                accumulating changes to the code.
 * @param extraInstructionVisitor an optional extra visitor for all replaced
 *                                goto instructions.
 */
public GotoReturnReplacer(CodeAttributeEditor codeAttributeEditor,
                          InstructionVisitor extraInstructionVisitor)
{
    this.codeAttributeEditor     = codeAttributeEditor;
    this.extraInstructionVisitor = extraInstructionVisitor;
}
 
Example #22
Source File: NopRemover.java    From proguard with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Creates a new NopRemover.
 * @param codeAttributeEditor     a code editor that can be used for
 *                                accumulating changes to the code.
 * @param extraInstructionVisitor an optional extra visitor for all removed
 *                                nop instructions.
 */
public NopRemover(CodeAttributeEditor codeAttributeEditor,
                  InstructionVisitor  extraInstructionVisitor)
{
    this.codeAttributeEditor     = codeAttributeEditor;
    this.extraInstructionVisitor = extraInstructionVisitor;
}
 
Example #23
Source File: InstructionSequencesReplacer.java    From java-n-IDE-for-Android with Apache License 2.0 3 votes vote down vote up
/**
 * Creates a new InstructionSequenceReplacer.
 * @param patternConstants        any constants referenced by the pattern
 *                                instruction.
 * @param instructionSequences    the instruction sequences to be replaced,
 *                                with subsequently the sequence pair index,
 *                                the patten/replacement index (0 or 1),
 *                                and the instruction index in the sequence.
 * @param branchTargetFinder      a branch target finder that has been
 *                                initialized to indicate branch targets
 *                                in the visited code.
 * @param codeAttributeEditor     a code editor that can be used for
 *                                accumulating changes to the code.
 * @param extraInstructionVisitor an optional extra visitor for all deleted
 *                                load instructions.
 */
public InstructionSequencesReplacer(Constant[]          patternConstants,
                                    Instruction[][][]   instructionSequences,
                                    BranchTargetFinder  branchTargetFinder,
                                    CodeAttributeEditor codeAttributeEditor,
                                    InstructionVisitor extraInstructionVisitor)
{
    super(createInstructionSequenceReplacers(patternConstants,
                                             instructionSequences,
                                             branchTargetFinder,
                                             codeAttributeEditor,
                                             extraInstructionVisitor));
}
 
Example #24
Source File: InstructionSequencesReplacer.java    From java-n-IDE-for-Android with Apache License 2.0 3 votes vote down vote up
/**
 * Creates a new InstructionSequencesReplacer.
 * @param patternConstants        any constants referenced by the pattern
 *                                instruction.
 * @param instructionSequences    the instruction sequences to be replaced,
 *                                with subsequently the sequence pair index,
 *                                the patten/replacement index (0 or 1),
 *                                and the instruction index in the sequence.
 * @param branchTargetFinder      a branch target finder that has been
 *                                initialized to indicate branch targets
 *                                in the visited code.
 * @param codeAttributeEditor     a code editor that can be used for
 *                                accumulating changes to the code.
 */
public InstructionSequencesReplacer(Constant[]          patternConstants,
                                    Instruction[][][]   instructionSequences,
                                    BranchTargetFinder  branchTargetFinder,
                                    CodeAttributeEditor codeAttributeEditor)
{
    this(patternConstants,
         instructionSequences,
         branchTargetFinder,
         codeAttributeEditor,
         null);
}
 
Example #25
Source File: NopRemover.java    From java-n-IDE-for-Android with Apache License 2.0 3 votes vote down vote up
/**
 * Creates a new NopRemover.
 * @param codeAttributeEditor     a code editor that can be used for
 *                                accumulating changes to the code.
 * @param extraInstructionVisitor an optional extra visitor for all removed
 *                                nop instructions.
 */
public NopRemover(CodeAttributeEditor codeAttributeEditor,
                  InstructionVisitor extraInstructionVisitor)
{
    this.codeAttributeEditor     = codeAttributeEditor;
    this.extraInstructionVisitor = extraInstructionVisitor;
}
 
Example #26
Source File: GotoReturnReplacer.java    From proguard with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Creates a new GotoReturnReplacer.
 * @param codeAttributeEditor     a code editor that can be used for
 *                                accumulating changes to the code.
 * @param extraInstructionVisitor an optional extra visitor for all replaced
 *                                goto instructions.
 */
public GotoReturnReplacer(CodeAttributeEditor codeAttributeEditor,
                          InstructionVisitor  extraInstructionVisitor)
{
    this.codeAttributeEditor     = codeAttributeEditor;
    this.extraInstructionVisitor = extraInstructionVisitor;
}
 
Example #27
Source File: GotoGotoReplacer.java    From proguard with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Creates a new GotoGotoReplacer.
 * @param codeAttributeEditor     a code editor that can be used for
 *                                accumulating changes to the code.
 * @param extraInstructionVisitor an optional extra visitor for all replaced
 *                                goto instructions.
 */
public GotoGotoReplacer(CodeAttributeEditor codeAttributeEditor,
                        InstructionVisitor  extraInstructionVisitor)
{
    this.codeAttributeEditor     = codeAttributeEditor;
    this.extraInstructionVisitor = extraInstructionVisitor;
}
 
Example #28
Source File: NopRemover.java    From proguard with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Creates a new NopRemover.
 * @param codeAttributeEditor a code editor that can be used for
 *                            accumulating changes to the code.
 */
public NopRemover(CodeAttributeEditor codeAttributeEditor)
{
    this(codeAttributeEditor, null);
}
 
Example #29
Source File: GotoGotoReplacer.java    From java-n-IDE-for-Android with Apache License 2.0 2 votes vote down vote up
/**
 * Creates a new GotoGotoReplacer.
 * @param codeAttributeEditor     a code editor that can be used for
 *                                accumulating changes to the code.
 */
public GotoGotoReplacer(CodeAttributeEditor codeAttributeEditor)
{
    this(codeAttributeEditor, null);
}
 
Example #30
Source File: GotoGotoReplacer.java    From bazel with Apache License 2.0 2 votes vote down vote up
/**
 * Creates a new GotoGotoReplacer.
 * @param codeAttributeEditor     a code editor that can be used for
 *                                accumulating changes to the code.
 */
public GotoGotoReplacer(CodeAttributeEditor codeAttributeEditor)
{
    this(codeAttributeEditor, null);
}