Java Code Examples for org.jf.util.ImmutableUtils

The following examples show how to use org.jf.util.ImmutableUtils. 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
Source Project: ZjDroid   Source File: ImmutableClassDef.java    License: Apache License 2.0 6 votes vote down vote up
public ImmutableClassDef(@Nonnull String type,
                         int accessFlags,
                         @Nullable String superclass,
                         @Nullable ImmutableSet<String> interfaces,
                         @Nullable String sourceFile,
                         @Nullable ImmutableSet<? extends ImmutableAnnotation> annotations,
                         @Nullable ImmutableSortedSet<? extends ImmutableField> staticFields,
                         @Nullable ImmutableSortedSet<? extends ImmutableField> instanceFields,
                         @Nullable ImmutableSortedSet<? extends ImmutableMethod> directMethods,
                         @Nullable ImmutableSortedSet<? extends ImmutableMethod> virtualMethods) {
    this.type = type;
    this.accessFlags = accessFlags;
    this.superclass = superclass;
    this.interfaces = ImmutableUtils.nullToEmptySet(interfaces);
    this.sourceFile = sourceFile;
    this.annotations = ImmutableUtils.nullToEmptySet(annotations);
    this.staticFields = ImmutableUtils.nullToEmptySortedSet(staticFields);
    this.instanceFields = ImmutableUtils.nullToEmptySortedSet(instanceFields);
    this.directMethods = ImmutableUtils.nullToEmptySortedSet(directMethods);
    this.virtualMethods = ImmutableUtils.nullToEmptySortedSet(virtualMethods);
}
 
Example 2
Source Project: zjdroid   Source File: ImmutableClassDef.java    License: Apache License 2.0 6 votes vote down vote up
public ImmutableClassDef(@Nonnull String type,
                         int accessFlags,
                         @Nullable String superclass,
                         @Nullable ImmutableSet<String> interfaces,
                         @Nullable String sourceFile,
                         @Nullable ImmutableSet<? extends ImmutableAnnotation> annotations,
                         @Nullable ImmutableSortedSet<? extends ImmutableField> staticFields,
                         @Nullable ImmutableSortedSet<? extends ImmutableField> instanceFields,
                         @Nullable ImmutableSortedSet<? extends ImmutableMethod> directMethods,
                         @Nullable ImmutableSortedSet<? extends ImmutableMethod> virtualMethods) {
    this.type = type;
    this.accessFlags = accessFlags;
    this.superclass = superclass;
    this.interfaces = ImmutableUtils.nullToEmptySet(interfaces);
    this.sourceFile = sourceFile;
    this.annotations = ImmutableUtils.nullToEmptySet(annotations);
    this.staticFields = ImmutableUtils.nullToEmptySortedSet(staticFields);
    this.instanceFields = ImmutableUtils.nullToEmptySortedSet(instanceFields);
    this.directMethods = ImmutableUtils.nullToEmptySortedSet(directMethods);
    this.virtualMethods = ImmutableUtils.nullToEmptySortedSet(virtualMethods);
}
 
Example 3
Source Project: HeyGirl   Source File: ImmutableClassDef.java    License: Apache License 2.0 6 votes vote down vote up
public ImmutableClassDef(@Nonnull String type,
                         int accessFlags,
                         @Nullable String superclass,
                         @Nullable ImmutableSet<String> interfaces,
                         @Nullable String sourceFile,
                         @Nullable ImmutableSet<? extends ImmutableAnnotation> annotations,
                         @Nullable ImmutableSortedSet<? extends ImmutableField> staticFields,
                         @Nullable ImmutableSortedSet<? extends ImmutableField> instanceFields,
                         @Nullable ImmutableSortedSet<? extends ImmutableMethod> directMethods,
                         @Nullable ImmutableSortedSet<? extends ImmutableMethod> virtualMethods) {
    this.type = type;
    this.accessFlags = accessFlags;
    this.superclass = superclass;
    this.interfaces = ImmutableUtils.nullToEmptySet(interfaces);
    this.sourceFile = sourceFile;
    this.annotations = ImmutableUtils.nullToEmptySet(annotations);
    this.staticFields = ImmutableUtils.nullToEmptySortedSet(staticFields);
    this.instanceFields = ImmutableUtils.nullToEmptySortedSet(instanceFields);
    this.directMethods = ImmutableUtils.nullToEmptySortedSet(directMethods);
    this.virtualMethods = ImmutableUtils.nullToEmptySortedSet(virtualMethods);
}
 
Example 4
Source Project: ZjDroid   Source File: ImmutableClassDef.java    License: Apache License 2.0 6 votes vote down vote up
public ImmutableClassDef(@Nonnull String type,
                         int accessFlags,
                         @Nullable String superclass,
                         @Nullable ImmutableSet<String> interfaces,
                         @Nullable String sourceFile,
                         @Nullable ImmutableSet<? extends ImmutableAnnotation> annotations,
                         @Nullable ImmutableSortedSet<? extends ImmutableField> staticFields,
                         @Nullable ImmutableSortedSet<? extends ImmutableField> instanceFields,
                         @Nullable ImmutableSortedSet<? extends ImmutableMethod> directMethods,
                         @Nullable ImmutableSortedSet<? extends ImmutableMethod> virtualMethods) {
    this.type = type;
    this.accessFlags = accessFlags;
    this.superclass = superclass;
    this.interfaces = ImmutableUtils.nullToEmptySet(interfaces);
    this.sourceFile = sourceFile;
    this.annotations = ImmutableUtils.nullToEmptySet(annotations);
    this.staticFields = ImmutableUtils.nullToEmptySortedSet(staticFields);
    this.instanceFields = ImmutableUtils.nullToEmptySortedSet(instanceFields);
    this.directMethods = ImmutableUtils.nullToEmptySortedSet(directMethods);
    this.virtualMethods = ImmutableUtils.nullToEmptySortedSet(virtualMethods);
}
 
Example 5
Source Project: ZjDroid   Source File: ImmutableMethodImplementation.java    License: Apache License 2.0 5 votes vote down vote up
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 6
Source Project: ZjDroid   Source File: ImmutableAnnotation.java    License: Apache License 2.0 5 votes vote down vote up
public ImmutableAnnotation(int visibility,
                           @Nonnull String type,
                           @Nullable ImmutableSet<? extends ImmutableAnnotationElement> elements) {
    this.visibility = visibility;
    this.type = type;
    this.elements = ImmutableUtils.nullToEmptySet(elements);
}
 
Example 7
Source Project: ZjDroid   Source 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 8
Source Project: ZjDroid   Source 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 9
Source Project: ZjDroid   Source 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 10
Source Project: ZjDroid   Source File: ImmutableMethodParameter.java    License: Apache License 2.0 5 votes vote down vote up
public ImmutableMethodParameter(@Nonnull String type,
                                @Nullable ImmutableSet<? extends ImmutableAnnotation> annotations,
                                @Nullable String name) {
    this.type = type;
    this.annotations = ImmutableUtils.nullToEmptySet(annotations);
    this.name = name;
}
 
Example 11
Source Project: ZjDroid   Source File: ImmutableMethodReference.java    License: Apache License 2.0 5 votes vote down vote up
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 12
Source Project: ZjDroid   Source File: ImmutableField.java    License: Apache License 2.0 5 votes vote down vote up
public ImmutableField(@Nonnull String definingClass,
                      @Nonnull String name,
                      @Nonnull String type,
                      int accessFlags,
                      @Nullable ImmutableEncodedValue initialValue,
                      @Nullable ImmutableSet<? extends ImmutableAnnotation> annotations) {
    this.definingClass = definingClass;
    this.name = name;
    this.type = type;
    this.accessFlags = accessFlags;
    this.initialValue = initialValue;
    this.annotations = ImmutableUtils.nullToEmptySet(annotations);
}
 
Example 13
Source Project: zjdroid   Source File: ImmutableMethodImplementation.java    License: Apache License 2.0 5 votes vote down vote up
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 14
Source Project: zjdroid   Source File: ImmutableAnnotation.java    License: Apache License 2.0 5 votes vote down vote up
public ImmutableAnnotation(int visibility,
                           @Nonnull String type,
                           @Nullable ImmutableSet<? extends ImmutableAnnotationElement> elements) {
    this.visibility = visibility;
    this.type = type;
    this.elements = ImmutableUtils.nullToEmptySet(elements);
}
 
Example 15
Source Project: zjdroid   Source 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 16
Source Project: zjdroid   Source 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 17
Source Project: zjdroid   Source 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 18
Source Project: zjdroid   Source File: ImmutableMethodParameter.java    License: Apache License 2.0 5 votes vote down vote up
public ImmutableMethodParameter(@Nonnull String type,
                                @Nullable ImmutableSet<? extends ImmutableAnnotation> annotations,
                                @Nullable String name) {
    this.type = type;
    this.annotations = ImmutableUtils.nullToEmptySet(annotations);
    this.name = name;
}
 
Example 19
Source Project: zjdroid   Source File: ImmutableMethodReference.java    License: Apache License 2.0 5 votes vote down vote up
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 20
Source Project: zjdroid   Source File: ImmutableField.java    License: Apache License 2.0 5 votes vote down vote up
public ImmutableField(@Nonnull String definingClass,
                      @Nonnull String name,
                      @Nonnull String type,
                      int accessFlags,
                      @Nullable ImmutableEncodedValue initialValue,
                      @Nullable ImmutableSet<? extends ImmutableAnnotation> annotations) {
    this.definingClass = definingClass;
    this.name = name;
    this.type = type;
    this.accessFlags = accessFlags;
    this.initialValue = initialValue;
    this.annotations = ImmutableUtils.nullToEmptySet(annotations);
}
 
Example 21
Source Project: HeyGirl   Source File: ImmutableMethodImplementation.java    License: Apache License 2.0 5 votes vote down vote up
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 22
Source Project: HeyGirl   Source File: ImmutableAnnotation.java    License: Apache License 2.0 5 votes vote down vote up
public ImmutableAnnotation(int visibility,
                           @Nonnull String type,
                           @Nullable ImmutableSet<? extends ImmutableAnnotationElement> elements) {
    this.visibility = visibility;
    this.type = type;
    this.elements = ImmutableUtils.nullToEmptySet(elements);
}
 
Example 23
Source Project: HeyGirl   Source 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 24
Source Project: HeyGirl   Source 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 25
Source Project: HeyGirl   Source 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 26
Source Project: HeyGirl   Source File: ImmutableMethodParameter.java    License: Apache License 2.0 5 votes vote down vote up
public ImmutableMethodParameter(@Nonnull String type,
                                @Nullable ImmutableSet<? extends ImmutableAnnotation> annotations,
                                @Nullable String name) {
    this.type = type;
    this.annotations = ImmutableUtils.nullToEmptySet(annotations);
    this.name = name;
}
 
Example 27
Source Project: HeyGirl   Source File: ImmutableMethodReference.java    License: Apache License 2.0 5 votes vote down vote up
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 28
Source Project: HeyGirl   Source File: ImmutableField.java    License: Apache License 2.0 5 votes vote down vote up
public ImmutableField(@Nonnull String definingClass,
                      @Nonnull String name,
                      @Nonnull String type,
                      int accessFlags,
                      @Nullable ImmutableEncodedValue initialValue,
                      @Nullable ImmutableSet<? extends ImmutableAnnotation> annotations) {
    this.definingClass = definingClass;
    this.name = name;
    this.type = type;
    this.accessFlags = accessFlags;
    this.initialValue = initialValue;
    this.annotations = ImmutableUtils.nullToEmptySet(annotations);
}
 
Example 29
Source Project: ZjDroid   Source File: ImmutableMethodImplementation.java    License: Apache License 2.0 5 votes vote down vote up
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 30
Source Project: ZjDroid   Source File: ImmutableAnnotation.java    License: Apache License 2.0 5 votes vote down vote up
public ImmutableAnnotation(int visibility,
                           @Nonnull String type,
                           @Nullable ImmutableSet<? extends ImmutableAnnotationElement> elements) {
    this.visibility = visibility;
    this.type = type;
    this.elements = ImmutableUtils.nullToEmptySet(elements);
}