org.jf.dexlib2.builder.SwitchLabelElement Java Examples

The following examples show how to use org.jf.dexlib2.builder.SwitchLabelElement. 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: BuilderSparseSwitchPayload.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
public BuilderSparseSwitchPayload(@Nullable List<? extends SwitchLabelElement> switchElements) {
    super(OPCODE);
    if (switchElements == null) {
        this.switchElements = ImmutableList.of();
    } else {
        this.switchElements = Lists.transform(switchElements, new Function<SwitchLabelElement, BuilderSwitchElement>() {
            @Nullable @Override public BuilderSwitchElement apply(@Nullable SwitchLabelElement element) {
                assert element != null;
                return new BuilderSwitchElement(BuilderSparseSwitchPayload.this, element.key, element.target);
            }
        });
    }
}
 
Example #2
Source File: BuilderSparseSwitchPayload.java    From zjdroid with Apache License 2.0 5 votes vote down vote up
public BuilderSparseSwitchPayload(@Nullable List<? extends SwitchLabelElement> switchElements) {
    super(OPCODE);
    if (switchElements == null) {
        this.switchElements = ImmutableList.of();
    } else {
        this.switchElements = Lists.transform(switchElements, new Function<SwitchLabelElement, BuilderSwitchElement>() {
            @Nullable @Override public BuilderSwitchElement apply(@Nullable SwitchLabelElement element) {
                assert element != null;
                return new BuilderSwitchElement(BuilderSparseSwitchPayload.this, element.key, element.target);
            }
        });
    }
}
 
Example #3
Source File: SparseSwitchPayload.java    From JAADAS with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected BuilderInstruction getRealInsn0(LabelAssigner assigner) {
	List<SwitchLabelElement> elements = new ArrayList<SwitchLabelElement>();
	for (int i = 0; i < keys.length; i++)
		elements.add(new SwitchLabelElement(keys[i],
				assigner.getOrCreateLabel((Stmt) targets.get(i))));
	return new BuilderSparseSwitchPayload(elements);
}
 
Example #4
Source File: BuilderSparseSwitchPayload.java    From HeyGirl with Apache License 2.0 5 votes vote down vote up
public BuilderSparseSwitchPayload(@Nullable List<? extends SwitchLabelElement> switchElements) {
    super(OPCODE);
    if (switchElements == null) {
        this.switchElements = ImmutableList.of();
    } else {
        this.switchElements = Lists.transform(switchElements, new Function<SwitchLabelElement, BuilderSwitchElement>() {
            @Nullable @Override public BuilderSwitchElement apply(@Nullable SwitchLabelElement element) {
                assert element != null;
                return new BuilderSwitchElement(BuilderSparseSwitchPayload.this, element.key, element.target);
            }
        });
    }
}
 
Example #5
Source File: BuilderSparseSwitchPayload.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
public BuilderSparseSwitchPayload(@Nullable List<? extends SwitchLabelElement> switchElements) {
    super(OPCODE);
    if (switchElements == null) {
        this.switchElements = ImmutableList.of();
    } else {
        this.switchElements = Lists.transform(switchElements, new Function<SwitchLabelElement, BuilderSwitchElement>() {
            @Nullable @Override public BuilderSwitchElement apply(@Nullable SwitchLabelElement element) {
                assert element != null;
                return new BuilderSwitchElement(BuilderSparseSwitchPayload.this, element.key, element.target);
            }
        });
    }
}