org.jf.util.ImmutableUtils Java Examples

The following examples show how to use org.jf.util.ImmutableUtils. 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: ImmutableClassDef.java    From zjdroid with 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 File: ImmutableClassDef.java    From ZjDroid with 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 File: ImmutableClassDef.java    From ZjDroid with 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 File: ImmutableClassDef.java    From HeyGirl with 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 File: ImmutableField.java    From HeyGirl with 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 #6
Source File: ImmutableMethodReference.java    From zjdroid with 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 #7
Source File: ImmutableField.java    From zjdroid with 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 #8
Source File: ImmutableMethodImplementation.java    From ZjDroid with 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 #9
Source File: ImmutableAnnotation.java    From HeyGirl with 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 #10
Source File: ImmutableArrayPayload.java    From HeyGirl with 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 #11
Source File: ImmutableTryBlock.java    From HeyGirl with 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 #12
Source File: ImmutableMethod.java    From HeyGirl with 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 #13
Source File: ImmutableMethodParameter.java    From HeyGirl with 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 #14
Source File: ImmutableMethodReference.java    From HeyGirl with 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 #15
Source File: ImmutableMethodImplementation.java    From HeyGirl with 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 #16
Source File: ImmutableMethodImplementation.java    From ZjDroid with 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 #17
Source File: ImmutableAnnotation.java    From ZjDroid with 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 #18
Source File: ImmutableArrayPayload.java    From ZjDroid with 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 #19
Source File: ImmutableTryBlock.java    From ZjDroid with 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 #20
Source File: ImmutableMethod.java    From ZjDroid with 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 #21
Source File: ImmutableMethodParameter.java    From ZjDroid with 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 #22
Source File: ImmutableMethodReference.java    From ZjDroid with 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 #23
Source File: ImmutableField.java    From ZjDroid with 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 #24
Source File: ImmutableMethod.java    From zjdroid with 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 #25
Source File: ImmutableAnnotation.java    From ZjDroid with 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 #26
Source File: ImmutableArrayPayload.java    From ZjDroid with 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 #27
Source File: ImmutableTryBlock.java    From ZjDroid with 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 #28
Source File: ImmutableMethod.java    From ZjDroid with 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 #29
Source File: ImmutableMethodParameter.java    From ZjDroid with 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 #30
Source File: ImmutableMethodReference.java    From ZjDroid with 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;
}