Java Code Examples for jdk.internal.org.objectweb.asm.Opcodes#ASM6

The following examples show how to use jdk.internal.org.objectweb.asm.Opcodes#ASM6 . 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: RemappingMethodAdapter.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
public RemappingMethodAdapter(
        final int access,
        final String descriptor,
        final MethodVisitor methodVisitor,
        final Remapper remapper) {
    this(Opcodes.ASM6, access, descriptor, methodVisitor, remapper);
}
 
Example 2
Source File: SignatureVisitor.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
  * Constructs a new {@link SignatureVisitor}.
  *
  * @param api the ASM API version implemented by this visitor. Must be one of {@link
  *     Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
  */
public SignatureVisitor(final int api) {
    if (api != Opcodes.ASM6 && api != Opcodes.ASM5 && api != Opcodes.ASM4 && api != Opcodes.ASM7) {
        throw new IllegalArgumentException();
    }
    this.api = api;
}
 
Example 3
Source File: RemappingSignatureAdapter.java    From Bytecoder with Apache License 2.0 4 votes vote down vote up
public RemappingSignatureAdapter(
        final SignatureVisitor signatureVisitor, final Remapper remapper) {
    this(Opcodes.ASM6, signatureVisitor, remapper);
}
 
Example 4
Source File: RemappingFieldAdapter.java    From Bytecoder with Apache License 2.0 4 votes vote down vote up
public RemappingFieldAdapter(final FieldVisitor fieldVisitor, final Remapper remapper) {
    this(Opcodes.ASM6, fieldVisitor, remapper);
}
 
Example 5
Source File: RemappingAnnotationAdapter.java    From Bytecoder with Apache License 2.0 4 votes vote down vote up
public RemappingAnnotationAdapter(
        final AnnotationVisitor annotationVisitor, final Remapper remapper) {
    this(Opcodes.ASM6, annotationVisitor, remapper);
}
 
Example 6
Source File: RemappingClassAdapter.java    From Bytecoder with Apache License 2.0 4 votes vote down vote up
public RemappingClassAdapter(final ClassVisitor classVisitor, final Remapper remapper) {
    this(Opcodes.ASM6, classVisitor, remapper);
}
 
Example 7
Source File: ClassNode.java    From Bytecoder with Apache License 2.0 4 votes vote down vote up
/**
  * Checks that this class node is compatible with the given ASM API version. This method checks
  * that this node, and all its children recursively, do not contain elements that were introduced
  * in more recent versions of the ASM API than the given version.
  *
  * @param api an ASM API version. Must be one of {@link Opcodes#ASM4}, {@link Opcodes#ASM5},
  *     {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
  */
public void check(final int api) {
    if (api < Opcodes.ASM7 && (nestHostClass != null || nestMembers != null)) {
        throw new UnsupportedClassVersionException();
    }
    if (api < Opcodes.ASM6 && module != null) {
        throw new UnsupportedClassVersionException();
    }
    if (api < Opcodes.ASM5) {
        if (visibleTypeAnnotations != null && !visibleTypeAnnotations.isEmpty()) {
            throw new UnsupportedClassVersionException();
        }
        if (invisibleTypeAnnotations != null && !invisibleTypeAnnotations.isEmpty()) {
            throw new UnsupportedClassVersionException();
        }
    }
    // Check the annotations.
    if (visibleAnnotations != null) {
        for (int i = visibleAnnotations.size() - 1; i >= 0; --i) {
            visibleAnnotations.get(i).check(api);
        }
    }
    if (invisibleAnnotations != null) {
        for (int i = invisibleAnnotations.size() - 1; i >= 0; --i) {
            invisibleAnnotations.get(i).check(api);
        }
    }
    if (visibleTypeAnnotations != null) {
        for (int i = visibleTypeAnnotations.size() - 1; i >= 0; --i) {
            visibleTypeAnnotations.get(i).check(api);
        }
    }
    if (invisibleTypeAnnotations != null) {
        for (int i = invisibleTypeAnnotations.size() - 1; i >= 0; --i) {
            invisibleTypeAnnotations.get(i).check(api);
        }
    }
    for (int i = fields.size() - 1; i >= 0; --i) {
        fields.get(i).check(api);
    }
    for (int i = methods.size() - 1; i >= 0; --i) {
        methods.get(i).check(api);
    }
}