Class AtAjAttributes

java.lang.Object
org.aspectj.weaver.bcel.AtAjAttributes

public class AtAjAttributes extends Object
Annotation defined aspect reader. Reads the Java 5 annotations and turns them into AjAttributes
Author:
Alexandre Vasseur (alex AT gnilux DOT com)
  • Constructor Details

    • AtAjAttributes

      public AtAjAttributes()
  • Method Details

    • acceptAttribute

      public static boolean acceptAttribute(Attribute attribute)
      Annotations are RuntimeVisible only. This allow us to not visit RuntimeInvisible ones.
      Parameters:
      attribute -
      Returns:
      true if runtime visible annotation
    • readAj5ClassAttributes

      public static List<AjAttribute> readAj5ClassAttributes(AsmManager model, JavaClass javaClass, ReferenceType type, ISourceContext context, IMessageHandler msgHandler, boolean isCodeStyleAspect)
      Extract class level annotations and turn them into AjAttributes.
      Parameters:
      javaClass -
      type -
      context -
      msgHandler -
      Returns:
      list of AjAttributes
    • readAj5MethodAttributes

      public static List<AjAttribute> readAj5MethodAttributes(Method method, org.aspectj.weaver.bcel.BcelMethod bMethod, ResolvedType type, ResolvedPointcutDefinition preResolvedPointcut, ISourceContext context, IMessageHandler msgHandler)
      Extract method level annotations and turn them into AjAttributes.
      Parameters:
      method -
      type -
      context -
      msgHandler -
      Returns:
      list of AjAttributes
    • readAj5FieldAttributes

      public static List<AjAttribute> readAj5FieldAttributes(Field field, org.aspectj.weaver.bcel.BcelField bField, ResolvedType type, ISourceContext context, IMessageHandler msgHandler)
      Extract field level annotations and turn them into AjAttributes.
      Parameters:
      field -
      type -
      context -
      msgHandler -
      Returns:
      list of AjAttributes, always empty for now
    • getMethodForMessage

      public static String getMethodForMessage(org.aspectj.weaver.bcel.AtAjAttributes.AjAttributeMethodStruct methodstructure)
      Returns:
      a nicely formatted method string, for example: int X.foo(java.lang.String)
    • extractExtraArgument

      public static int extractExtraArgument(String[] argumentSignatures)
      Compute the flag for the xxxJoinPoint extra argument
      Parameters:
      argumentSignatures -
      Returns:
      extra arg flag