Java Code Examples for jdk.internal.org.objectweb.asm.Attribute

The following examples show how to use jdk.internal.org.objectweb.asm.Attribute. 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: dragonwell8_jdk   Source File: FieldNode.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public void visitAttribute(final Attribute attr) {
    if (attrs == null) {
        attrs = new ArrayList<Attribute>(1);
    }
    attrs.add(attr);
}
 
Example 2
Source Project: dragonwell8_jdk   Source File: ClassNode.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public void visitAttribute(final Attribute attr) {
    if (attrs == null) {
        attrs = new ArrayList<Attribute>(1);
    }
    attrs.add(attr);
}
 
Example 3
Source Project: dragonwell8_jdk   Source File: MethodNode.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public void visitAttribute(final Attribute attr) {
    if (attrs == null) {
        attrs = new ArrayList<Attribute>(1);
    }
    attrs.add(attr);
}
 
Example 4
@Override
public void visitAttribute(final Attribute attr) {
    checkEnd();
    if (attr == null) {
        throw new IllegalArgumentException(
                "Invalid attribute (must not be null)");
    }
    super.visitAttribute(attr);
}
 
Example 5
Source Project: dragonwell8_jdk   Source File: ASMifier.java    License: GNU General Public License v2.0 5 votes vote down vote up
public void visitAttribute(final Attribute attr) {
    buf.setLength(0);
    buf.append("// ATTRIBUTE ").append(attr.type).append('\n');
    if (attr instanceof ASMifiable) {
        if (labelNames == null) {
            labelNames = new HashMap<Label, String>();
        }
        buf.append("{\n");
        ((ASMifiable) attr).asmify(buf, "attr", labelNames);
        buf.append(name).append(".visitAttribute(attr);\n");
        buf.append("}\n");
    }
    text.add(buf.toString());
}
 
Example 6
@Override
public void visitAttribute(final Attribute attr) {
    checkState();
    if (attr == null) {
        throw new IllegalArgumentException(
                "Invalid attribute (must not be null)");
    }
    super.visitAttribute(attr);
}
 
Example 7
Source Project: dragonwell8_jdk   Source File: Textifier.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public void visitMethodAttribute(final Attribute attr) {
    buf.setLength(0);
    buf.append(tab).append("ATTRIBUTE ");
    appendDescriptor(-1, attr.type);

    if (attr instanceof Textifiable) {
        ((Textifiable) attr).textify(buf, labelNames);
    } else {
        buf.append(" : unknown\n");
    }

    text.add(buf.toString());
}
 
Example 8
Source Project: dragonwell8_jdk   Source File: Textifier.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Prints a disassembled view of the given attribute.
 *
 * @param attr
 *            an attribute.
 */
public void visitAttribute(final Attribute attr) {
    buf.setLength(0);
    buf.append(tab).append("ATTRIBUTE ");
    appendDescriptor(-1, attr.type);

    if (attr instanceof Textifiable) {
        ((Textifiable) attr).textify(buf, null);
    } else {
        buf.append(" : unknown\n");
    }

    text.add(buf.toString());
}
 
Example 9
@Override
public void visitAttribute(final Attribute attr) {
    checkEndMethod();
    if (attr == null) {
        throw new IllegalArgumentException(
                "Invalid attribute (must not be null)");
    }
    super.visitAttribute(attr);
}
 
Example 10
Source Project: TencentKona-8   Source File: FieldNode.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public void visitAttribute(final Attribute attr) {
    if (attrs == null) {
        attrs = new ArrayList<Attribute>(1);
    }
    attrs.add(attr);
}
 
Example 11
Source Project: TencentKona-8   Source File: ClassNode.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public void visitAttribute(final Attribute attr) {
    if (attrs == null) {
        attrs = new ArrayList<Attribute>(1);
    }
    attrs.add(attr);
}
 
Example 12
Source Project: TencentKona-8   Source File: MethodNode.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public void visitAttribute(final Attribute attr) {
    if (attrs == null) {
        attrs = new ArrayList<Attribute>(1);
    }
    attrs.add(attr);
}
 
Example 13
@Override
public void visitAttribute(final Attribute attr) {
    checkEnd();
    if (attr == null) {
        throw new IllegalArgumentException(
                "Invalid attribute (must not be null)");
    }
    super.visitAttribute(attr);
}
 
Example 14
Source Project: TencentKona-8   Source File: ASMifier.java    License: GNU General Public License v2.0 5 votes vote down vote up
public void visitAttribute(final Attribute attr) {
    buf.setLength(0);
    buf.append("// ATTRIBUTE ").append(attr.type).append('\n');
    if (attr instanceof ASMifiable) {
        if (labelNames == null) {
            labelNames = new HashMap<Label, String>();
        }
        buf.append("{\n");
        ((ASMifiable) attr).asmify(buf, "attr", labelNames);
        buf.append(name).append(".visitAttribute(attr);\n");
        buf.append("}\n");
    }
    text.add(buf.toString());
}
 
Example 15
Source Project: openjdk-jdk8u   Source File: Textifier.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public void visitMethodAttribute(final Attribute attr) {
    buf.setLength(0);
    buf.append(tab).append("ATTRIBUTE ");
    appendDescriptor(-1, attr.type);

    if (attr instanceof Textifiable) {
        ((Textifiable) attr).textify(buf, labelNames);
    } else {
        buf.append(" : unknown\n");
    }

    text.add(buf.toString());
}
 
Example 16
Source Project: TencentKona-8   Source File: Textifier.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public void visitMethodAttribute(final Attribute attr) {
    buf.setLength(0);
    buf.append(tab).append("ATTRIBUTE ");
    appendDescriptor(-1, attr.type);

    if (attr instanceof Textifiable) {
        ((Textifiable) attr).textify(buf, labelNames);
    } else {
        buf.append(" : unknown\n");
    }

    text.add(buf.toString());
}
 
Example 17
@Override
public FieldVisitor visitField(final int fieldAccess, final String fieldName,
        final String fieldDesc, final String signature, final Object value) {
    final MemberInfo memInfo = scriptClassInfo.find(fieldName, fieldDesc, fieldAccess);
    if (memInfo != null && memInfo.getKind() == Kind.PROPERTY &&
            memInfo.getWhere() != Where.INSTANCE && !memInfo.isStaticFinal()) {
        // non-instance @Property fields - these have to go elsewhere unless 'static final'
        return null;
    }

    final FieldVisitor delegateFV = super.visitField(fieldAccess, fieldName, fieldDesc,
            signature, value);
    return new FieldVisitor(Opcodes.ASM4, delegateFV) {
        @Override
        public AnnotationVisitor visitAnnotation(final String desc, final boolean visible) {
            if (ScriptClassInfo.annotations.containsKey(desc)) {
                // ignore script field annotations
                return null;
            }

            return fv.visitAnnotation(desc, visible);
        }

        @Override
        public void visitAttribute(final Attribute attr) {
            fv.visitAttribute(attr);
        }

        @Override
        public void visitEnd() {
            fv.visitEnd();
        }
    };
}
 
Example 18
@Override
public void visitAttribute(final Attribute attr) {
    checkEndMethod();
    if (attr == null) {
        throw new IllegalArgumentException(
                "Invalid attribute (must not be null)");
    }
    super.visitAttribute(attr);
}
 
Example 19
@Override
public FieldVisitor visitField(final int fieldAccess, final String fieldName,
        final String fieldDesc, final String signature, final Object value) {
    final MemberInfo memInfo = scriptClassInfo.find(fieldName, fieldDesc, fieldAccess);
    if (memInfo != null && memInfo.getKind() == Kind.PROPERTY &&
            memInfo.getWhere() != Where.INSTANCE && !memInfo.isStaticFinal()) {
        // non-instance @Property fields - these have to go elsewhere unless 'static final'
        return null;
    }

    final FieldVisitor delegateFV = super.visitField(fieldAccess, fieldName, fieldDesc,
            signature, value);
    return new FieldVisitor(Opcodes.ASM4, delegateFV) {
        @Override
        public AnnotationVisitor visitAnnotation(final String desc, final boolean visible) {
            if (ScriptClassInfo.annotations.containsKey(desc)) {
                // ignore script field annotations
                return null;
            }

            return fv.visitAnnotation(desc, visible);
        }

        @Override
        public void visitAttribute(final Attribute attr) {
            fv.visitAttribute(attr);
        }

        @Override
        public void visitEnd() {
            fv.visitEnd();
        }
    };
}
 
Example 20
Source Project: jdk8u60   Source File: FieldNode.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public void visitAttribute(final Attribute attr) {
    if (attrs == null) {
        attrs = new ArrayList<Attribute>(1);
    }
    attrs.add(attr);
}
 
Example 21
Source Project: jdk8u60   Source File: ClassNode.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public void visitAttribute(final Attribute attr) {
    if (attrs == null) {
        attrs = new ArrayList<Attribute>(1);
    }
    attrs.add(attr);
}
 
Example 22
Source Project: jdk8u60   Source File: MethodNode.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public void visitAttribute(final Attribute attr) {
    if (attrs == null) {
        attrs = new ArrayList<Attribute>(1);
    }
    attrs.add(attr);
}
 
Example 23
Source Project: jdk8u60   Source File: CheckFieldAdapter.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public void visitAttribute(final Attribute attr) {
    checkEnd();
    if (attr == null) {
        throw new IllegalArgumentException(
                "Invalid attribute (must not be null)");
    }
    super.visitAttribute(attr);
}
 
Example 24
Source Project: jdk8u60   Source File: ASMifier.java    License: GNU General Public License v2.0 5 votes vote down vote up
public void visitAttribute(final Attribute attr) {
    buf.setLength(0);
    buf.append("// ATTRIBUTE ").append(attr.type).append('\n');
    if (attr instanceof ASMifiable) {
        if (labelNames == null) {
            labelNames = new HashMap<Label, String>();
        }
        buf.append("{\n");
        ((ASMifiable) attr).asmify(buf, "attr", labelNames);
        buf.append(name).append(".visitAttribute(attr);\n");
        buf.append("}\n");
    }
    text.add(buf.toString());
}
 
Example 25
Source Project: jdk8u60   Source File: CheckClassAdapter.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public void visitAttribute(final Attribute attr) {
    checkState();
    if (attr == null) {
        throw new IllegalArgumentException(
                "Invalid attribute (must not be null)");
    }
    super.visitAttribute(attr);
}
 
Example 26
@Override
public void visitAttribute(final Attribute attr) {
    checkEndMethod();
    if (attr == null) {
        throw new IllegalArgumentException(
                "Invalid attribute (must not be null)");
    }
    super.visitAttribute(attr);
}
 
Example 27
Source Project: jdk8u60   Source File: Textifier.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public void visitMethodAttribute(final Attribute attr) {
    buf.setLength(0);
    buf.append(tab).append("ATTRIBUTE ");
    appendDescriptor(-1, attr.type);

    if (attr instanceof Textifiable) {
        ((Textifiable) attr).textify(buf, labelNames);
    } else {
        buf.append(" : unknown\n");
    }

    text.add(buf.toString());
}
 
Example 28
Source Project: openjdk-jdk8u   Source File: Textifier.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Prints a disassembled view of the given attribute.
 *
 * @param attr
 *            an attribute.
 */
public void visitAttribute(final Attribute attr) {
    buf.setLength(0);
    buf.append(tab).append("ATTRIBUTE ");
    appendDescriptor(-1, attr.type);

    if (attr instanceof Textifiable) {
        ((Textifiable) attr).textify(buf, null);
    } else {
        buf.append(" : unknown\n");
    }

    text.add(buf.toString());
}
 
Example 29
Source Project: jdk8u60   Source File: CheckMethodAdapter.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public void visitAttribute(final Attribute attr) {
    checkEndMethod();
    if (attr == null) {
        throw new IllegalArgumentException(
                "Invalid attribute (must not be null)");
    }
    super.visitAttribute(attr);
}
 
Example 30
@Override
public FieldVisitor visitField(final int fieldAccess, final String fieldName,
        final String fieldDesc, final String signature, final Object value) {
    final MemberInfo memInfo = scriptClassInfo.find(fieldName, fieldDesc, fieldAccess);
    if (memInfo != null && memInfo.getKind() == Kind.PROPERTY &&
            memInfo.getWhere() != Where.INSTANCE && !memInfo.isStaticFinal()) {
        // non-instance @Property fields - these have to go elsewhere unless 'static final'
        return null;
    }

    final FieldVisitor delegateFV = super.visitField(fieldAccess, fieldName, fieldDesc,
            signature, value);
    return new FieldVisitor(Opcodes.ASM4, delegateFV) {
        @Override
        public AnnotationVisitor visitAnnotation(final String desc, final boolean visible) {
            if (ScriptClassInfo.annotations.containsKey(desc)) {
                // ignore script field annotations
                return null;
            }

            return fv.visitAnnotation(desc, visible);
        }

        @Override
        public void visitAttribute(final Attribute attr) {
            fv.visitAttribute(attr);
        }

        @Override
        public void visitEnd() {
            fv.visitEnd();
        }
    };
}