Java Code Examples for org.jf.util.ImmutableUtils#nullToEmptyList()

The following examples show how to use org.jf.util.ImmutableUtils#nullToEmptyList() . These examples are extracted from open source projects. 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
public ImmutableMethodImplementation(int registerCount,
                                     @Nullable ImmutableList<? extends ImmutableInstruction> instructions,
                                     @Nullable ImmutableList<? extends ImmutableTryBlock> tryBlocks,
                                     @Nullable ImmutableList<? extends ImmutableDebugItem> debugItems) {
    this.registerCount = registerCount;
    this.instructions = ImmutableUtils.nullToEmptyList(instructions);
    this.tryBlocks = ImmutableUtils.nullToEmptyList(tryBlocks);
    this.debugItems = ImmutableUtils.nullToEmptyList(debugItems);
}
 
Example 2
Source Project: ZjDroid   File: ImmutableArrayPayload.java    License: Apache License 2.0 5 votes vote down vote up
public ImmutableArrayPayload(int elementWidth,
                             @Nullable ImmutableList<Number> arrayElements) {
    super(OPCODE);
    //TODO: need to ensure this is a valid width (1, 2, 4, 8)
    this.elementWidth = elementWidth;
    //TODO: need to validate the elements fit within the width
    this.arrayElements = ImmutableUtils.nullToEmptyList(arrayElements);
}
 
Example 3
Source Project: ZjDroid   File: ImmutableTryBlock.java    License: Apache License 2.0 5 votes vote down vote up
public ImmutableTryBlock(int startCodeAddress,
                         int codeUnitCount,
                         @Nullable ImmutableList<? extends ImmutableExceptionHandler> exceptionHandlers) {
    this.startCodeAddress = startCodeAddress;
    this.codeUnitCount = codeUnitCount;
    this.exceptionHandlers = ImmutableUtils.nullToEmptyList(exceptionHandlers);
}
 
Example 4
Source Project: ZjDroid   File: ImmutableMethod.java    License: Apache License 2.0 5 votes vote down vote up
public ImmutableMethod(@Nonnull String definingClass,
                       @Nonnull String name,
                       @Nullable ImmutableList<? extends ImmutableMethodParameter> parameters,
                       @Nonnull String returnType,
                       int accessFlags,
                       @Nullable ImmutableSet<? extends ImmutableAnnotation> annotations,
                       @Nullable ImmutableMethodImplementation methodImplementation) {
    this.definingClass = definingClass;
    this.name = name;
    this.parameters = ImmutableUtils.nullToEmptyList(parameters);
    this.returnType = returnType;
    this.accessFlags = accessFlags;
    this.annotations = ImmutableUtils.nullToEmptySet(annotations);
    this.methodImplementation = methodImplementation;
}
 
Example 5
public ImmutableMethodReference(@Nonnull String definingClass,
                                @Nonnull String name,
                                @Nullable ImmutableList<String> parameters,
                                @Nonnull String returnType) {
    this.definingClass = definingClass;
    this.name = name;
    this.parameters = ImmutableUtils.nullToEmptyList(parameters);
    this.returnType = returnType;
}
 
Example 6
public ImmutableMethodImplementation(int registerCount,
                                     @Nullable ImmutableList<? extends ImmutableInstruction> instructions,
                                     @Nullable ImmutableList<? extends ImmutableTryBlock> tryBlocks,
                                     @Nullable ImmutableList<? extends ImmutableDebugItem> debugItems) {
    this.registerCount = registerCount;
    this.instructions = ImmutableUtils.nullToEmptyList(instructions);
    this.tryBlocks = ImmutableUtils.nullToEmptyList(tryBlocks);
    this.debugItems = ImmutableUtils.nullToEmptyList(debugItems);
}
 
Example 7
Source Project: ZjDroid   File: ImmutableMethod.java    License: Apache License 2.0 5 votes vote down vote up
public ImmutableMethod(@Nonnull String definingClass,
                       @Nonnull String name,
                       @Nullable ImmutableList<? extends ImmutableMethodParameter> parameters,
                       @Nonnull String returnType,
                       int accessFlags,
                       @Nullable ImmutableSet<? extends ImmutableAnnotation> annotations,
                       @Nullable ImmutableMethodImplementation methodImplementation) {
    this.definingClass = definingClass;
    this.name = name;
    this.parameters = ImmutableUtils.nullToEmptyList(parameters);
    this.returnType = returnType;
    this.accessFlags = accessFlags;
    this.annotations = ImmutableUtils.nullToEmptySet(annotations);
    this.methodImplementation = methodImplementation;
}
 
Example 8
Source Project: zjdroid   File: ImmutableArrayPayload.java    License: Apache License 2.0 5 votes vote down vote up
public ImmutableArrayPayload(int elementWidth,
                             @Nullable ImmutableList<Number> arrayElements) {
    super(OPCODE);
    //TODO: need to ensure this is a valid width (1, 2, 4, 8)
    this.elementWidth = elementWidth;
    //TODO: need to validate the elements fit within the width
    this.arrayElements = ImmutableUtils.nullToEmptyList(arrayElements);
}
 
Example 9
Source Project: zjdroid   File: ImmutableTryBlock.java    License: Apache License 2.0 5 votes vote down vote up
public ImmutableTryBlock(int startCodeAddress,
                         int codeUnitCount,
                         @Nullable ImmutableList<? extends ImmutableExceptionHandler> exceptionHandlers) {
    this.startCodeAddress = startCodeAddress;
    this.codeUnitCount = codeUnitCount;
    this.exceptionHandlers = ImmutableUtils.nullToEmptyList(exceptionHandlers);
}
 
Example 10
Source Project: zjdroid   File: ImmutableMethod.java    License: Apache License 2.0 5 votes vote down vote up
public ImmutableMethod(@Nonnull String definingClass,
                       @Nonnull String name,
                       @Nullable ImmutableList<? extends ImmutableMethodParameter> parameters,
                       @Nonnull String returnType,
                       int accessFlags,
                       @Nullable ImmutableSet<? extends ImmutableAnnotation> annotations,
                       @Nullable ImmutableMethodImplementation methodImplementation) {
    this.definingClass = definingClass;
    this.name = name;
    this.parameters = ImmutableUtils.nullToEmptyList(parameters);
    this.returnType = returnType;
    this.accessFlags = accessFlags;
    this.annotations = ImmutableUtils.nullToEmptySet(annotations);
    this.methodImplementation = methodImplementation;
}
 
Example 11
Source Project: ZjDroid   File: ImmutableArrayPayload.java    License: Apache License 2.0 5 votes vote down vote up
public ImmutableArrayPayload(int elementWidth,
                             @Nullable ImmutableList<Number> arrayElements) {
    super(OPCODE);
    //TODO: need to ensure this is a valid width (1, 2, 4, 8)
    this.elementWidth = elementWidth;
    //TODO: need to validate the elements fit within the width
    this.arrayElements = ImmutableUtils.nullToEmptyList(arrayElements);
}
 
Example 12
public ImmutableMethodImplementation(int registerCount,
                                     @Nullable ImmutableList<? extends ImmutableInstruction> instructions,
                                     @Nullable ImmutableList<? extends ImmutableTryBlock> tryBlocks,
                                     @Nullable ImmutableList<? extends ImmutableDebugItem> debugItems) {
    this.registerCount = registerCount;
    this.instructions = ImmutableUtils.nullToEmptyList(instructions);
    this.tryBlocks = ImmutableUtils.nullToEmptyList(tryBlocks);
    this.debugItems = ImmutableUtils.nullToEmptyList(debugItems);
}
 
Example 13
Source Project: ZjDroid   File: ImmutableTryBlock.java    License: Apache License 2.0 5 votes vote down vote up
public ImmutableTryBlock(int startCodeAddress,
                         int codeUnitCount,
                         @Nullable ImmutableList<? extends ImmutableExceptionHandler> exceptionHandlers) {
    this.startCodeAddress = startCodeAddress;
    this.codeUnitCount = codeUnitCount;
    this.exceptionHandlers = ImmutableUtils.nullToEmptyList(exceptionHandlers);
}
 
Example 14
Source Project: HeyGirl   File: ImmutableArrayPayload.java    License: Apache License 2.0 5 votes vote down vote up
public ImmutableArrayPayload(int elementWidth,
                             @Nullable ImmutableList<Number> arrayElements) {
    super(OPCODE);
    //TODO: need to ensure this is a valid width (1, 2, 4, 8)
    this.elementWidth = elementWidth;
    //TODO: need to validate the elements fit within the width
    this.arrayElements = ImmutableUtils.nullToEmptyList(arrayElements);
}
 
Example 15
Source Project: HeyGirl   File: ImmutableTryBlock.java    License: Apache License 2.0 5 votes vote down vote up
public ImmutableTryBlock(int startCodeAddress,
                         int codeUnitCount,
                         @Nullable ImmutableList<? extends ImmutableExceptionHandler> exceptionHandlers) {
    this.startCodeAddress = startCodeAddress;
    this.codeUnitCount = codeUnitCount;
    this.exceptionHandlers = ImmutableUtils.nullToEmptyList(exceptionHandlers);
}
 
Example 16
Source Project: HeyGirl   File: ImmutableMethod.java    License: Apache License 2.0 5 votes vote down vote up
public ImmutableMethod(@Nonnull String definingClass,
                       @Nonnull String name,
                       @Nullable ImmutableList<? extends ImmutableMethodParameter> parameters,
                       @Nonnull String returnType,
                       int accessFlags,
                       @Nullable ImmutableSet<? extends ImmutableAnnotation> annotations,
                       @Nullable ImmutableMethodImplementation methodImplementation) {
    this.definingClass = definingClass;
    this.name = name;
    this.parameters = ImmutableUtils.nullToEmptyList(parameters);
    this.returnType = returnType;
    this.accessFlags = accessFlags;
    this.annotations = ImmutableUtils.nullToEmptySet(annotations);
    this.methodImplementation = methodImplementation;
}
 
Example 17
public ImmutablePackedSwitchPayload(
        @Nullable ImmutableList<? extends ImmutableSwitchElement> switchElements) {
    super(OPCODE);
    this.switchElements = ImmutableUtils.nullToEmptyList(switchElements);
}
 
Example 18
public ImmutablePackedSwitchPayload(
        @Nullable ImmutableList<? extends ImmutableSwitchElement> switchElements) {
    super(OPCODE);
    this.switchElements = ImmutableUtils.nullToEmptyList(switchElements);
}
 
Example 19
public ImmutableSparseSwitchPayload(
        @Nullable ImmutableList<? extends ImmutableSwitchElement> switchElements) {
    super(OPCODE);
    this.switchElements = ImmutableUtils.nullToEmptyList(switchElements);
}
 
Example 20
public ImmutablePackedSwitchPayload(
        @Nullable ImmutableList<? extends ImmutableSwitchElement> switchElements) {
    super(OPCODE);
    this.switchElements = ImmutableUtils.nullToEmptyList(switchElements);
}