Example usage for org.aspectj.weaver AjAttribute AttributePrefix

List of usage examples for org.aspectj.weaver AjAttribute AttributePrefix

Introduction

In this page you can find the example usage for org.aspectj.weaver AjAttribute AttributePrefix.

Prototype

String AttributePrefix

To view the source code for org.aspectj.weaver AjAttribute AttributePrefix.

Click Source Link

Usage

From source file:org.codehaus.aspectwerkz.transform.aspectj.AspectJAspectModel.java

License:Open Source License

/**
 * Reads in the AjAttributes from the bytecode.
 *
 * @param attrs//from   w  w w  . jav a 2 s . c  o m
 * @param context
 * @return
 */
private static List readAjAttributes(final Attribute[] attrs, final ISourceContext context) {
    List ajAttrs = new ArrayList();
    for (int i = attrs.length - 1; i >= 0; i--) {
        Attribute a = attrs[i];
        if (a instanceof Unknown) {
            Unknown u = (Unknown) a;
            String name = u.getName();
            if (name.startsWith(AjAttribute.AttributePrefix)) {
                ajAttrs.add(AjAttribute.read(name, u.getBytes(), context));
            }
        }
    }
    return ajAttrs;
}