Package org.objectweb.asm.attrs

Examples of org.objectweb.asm.attrs.RuntimeInvisibleAnnotations


{

  protected Attribute read (ClassReader cr, int off,
    int len, char[] buf, int codeOff, Label[] labels)
  {
    RuntimeInvisibleAnnotations attr =
      (RuntimeInvisibleAnnotations)super.read(
        cr, off, len, buf, codeOff, labels);
   
    ASMRuntimeInvisibleAnnotations result = new ASMRuntimeInvisibleAnnotations();
    result.annotations = attr.annotations;
View Full Code Here


     */

    public static RuntimeInvisibleAnnotations linkRuntimeInvisibleAnnotations(final Attribute attribute) {

        RuntimeInvisibleAnnotations runtimeInvisibleAnnotations = null;

        Attribute lastAttribute = attribute;

        for (Attribute loop = attribute; loop != null; loop = loop.next) {

            lastAttribute = loop;

            if (loop instanceof RuntimeInvisibleAnnotations) {

                return runtimeInvisibleAnnotations = (RuntimeInvisibleAnnotations)loop;

            }

        }

        // not found, link a new one to lastAttribute

        runtimeInvisibleAnnotations = new RuntimeInvisibleAnnotations();

        runtimeInvisibleAnnotations.next = null;

        if (attribute != null) {

View Full Code Here

     *
     * @param attribute
     * @return the RuntimeInvisibleAnnotations to add Annotation to
     */
    public static RuntimeInvisibleAnnotations linkRuntimeInvisibleAnnotations(final Attribute attribute) {
        RuntimeInvisibleAnnotations runtimeInvisibleAnnotations = null;
        Attribute lastAttribute = attribute;
        for (Attribute loop = attribute; loop != null; loop = loop.next) {
            lastAttribute = loop;
            if (loop instanceof RuntimeInvisibleAnnotations) {
                return runtimeInvisibleAnnotations = (RuntimeInvisibleAnnotations) loop;
            }
        }
        // not found, link a new one to lastAttribute
        runtimeInvisibleAnnotations = new RuntimeInvisibleAnnotations();
        runtimeInvisibleAnnotations.next = null;
        if (attribute != null) {
            // if arg is null, we are just adding this annotation as the sole attribute
            lastAttribute.next = runtimeInvisibleAnnotations;
        } else {
View Full Code Here

     *
     * @param attribute
     * @return the RuntimeInvisibleAnnotations to add Annotation to
     */
    public static RuntimeInvisibleAnnotations linkRuntimeInvisibleAnnotations(final Attribute attribute) {
        RuntimeInvisibleAnnotations runtimeInvisibleAnnotations = null;
        Attribute lastAttribute = attribute;
        for (Attribute loop = attribute; loop != null; loop = loop.next) {
            lastAttribute = loop;
            if (loop instanceof RuntimeInvisibleAnnotations) {
                return runtimeInvisibleAnnotations = (RuntimeInvisibleAnnotations)loop;
            }
        }
        // not found, link a new one to lastAttribute
        runtimeInvisibleAnnotations = new RuntimeInvisibleAnnotations();
        runtimeInvisibleAnnotations.next = null;
        if (attribute != null) {
            // if arg is null, we are just adding this annotation as the sole attribute
            lastAttribute.next = runtimeInvisibleAnnotations;
        } else {
View Full Code Here

            final String name,
            final String desc,
            final Object value,
            final Attribute attrs) {

            RuntimeInvisibleAnnotations invisible = CustomAttributeHelper.linkRuntimeInvisibleAnnotations(attrs);
            for (Iterator it = m_fieldAttributes.iterator(); it.hasNext();) {
                FieldAttributeInfo struct = (FieldAttributeInfo) it.next();
                if (name.equals(struct.field.getName())) {
                    invisible.annotations.add(CustomAttributeHelper.createCustomAnnotation(struct.attribute));
                }
View Full Code Here

            final String name,
            final String desc,
            final String[] exceptions,
            final Attribute attrs) {

            RuntimeInvisibleAnnotations invisible = CustomAttributeHelper.linkRuntimeInvisibleAnnotations(attrs);
            if (!name.equals(INIT_METHOD_NAME)) {
                for (Iterator it = m_methodAttributes.iterator(); it.hasNext();) {
                    MethodAttributeInfo struct = (MethodAttributeInfo) it.next();
                    JavaMethod method = struct.method;
                    String[] parameters = QDoxParser.getJavaMethodParametersAsStringArray(method);
View Full Code Here

            return cv.visitMethod(access, name, desc, exceptions, (attrs!=null)?attrs:invisible);
        }

        public void visitAttribute(Attribute attrs) {
            classLevelAnnotationDone = true;
            RuntimeInvisibleAnnotations invisible = CustomAttributeHelper.linkRuntimeInvisibleAnnotations(attrs);
            for (Iterator it = m_classAttributes.iterator(); it.hasNext();) {
                byte[] bytes = (byte[])it.next();
                invisible.annotations.add(CustomAttributeHelper.createCustomAnnotation(bytes));
            }
            if (invisible.annotations.size() == 0) {
View Full Code Here

        }

        public void visitEnd() {
            if (!classLevelAnnotationDone) {
                classLevelAnnotationDone = true;
                RuntimeInvisibleAnnotations invisible = CustomAttributeHelper.linkRuntimeInvisibleAnnotations(null);
                for (Iterator it = m_classAttributes.iterator(); it.hasNext();) {
                    byte[] bytes = (byte[])it.next();
                    invisible.annotations.add(CustomAttributeHelper.createCustomAnnotation(bytes));
                }
                if (invisible.annotations.size() > 0) {
View Full Code Here

     *
     * @param attribute
     * @return the RuntimeInvisibleAnnotations to add Annotation to
     */
    public static RuntimeInvisibleAnnotations linkRuntimeInvisibleAnnotations(final Attribute attribute) {
        RuntimeInvisibleAnnotations runtimeInvisibleAnnotations = null;
        Attribute lastAttribute = attribute;
        for (Attribute loop = attribute; loop != null; loop = loop.next) {
            lastAttribute = loop;
            if (loop instanceof RuntimeInvisibleAnnotations) {
                return runtimeInvisibleAnnotations = (RuntimeInvisibleAnnotations) loop;
            }
        }
        // not found, link a new one to lastAttribute
        runtimeInvisibleAnnotations = new RuntimeInvisibleAnnotations();
        runtimeInvisibleAnnotations.next = null;
        if (attribute != null) {
            // if arg is null, we are just adding this annotation as the sole attribute
            lastAttribute.next = runtimeInvisibleAnnotations;
        } else {
View Full Code Here

                               final String name,
                               final String desc,
                               final Object value,
                               final Attribute attrs) {

            RuntimeInvisibleAnnotations invisible = CustomAttributeHelper.linkRuntimeInvisibleAnnotations(attrs);
            for (Iterator it = m_fieldAttributes.iterator(); it.hasNext();) {
                FieldAttributeInfo struct = (FieldAttributeInfo) it.next();
                if (name.equals(struct.field.getName())) {
                    invisible.annotations.add(CustomAttributeHelper.createCustomAnnotation(struct.attribute));
                }
View Full Code Here

TOP

Related Classes of org.objectweb.asm.attrs.RuntimeInvisibleAnnotations

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.