Package org.aspectj.org.eclipse.jdt.internal.compiler.ast

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.Annotation


    boolean isAnnotationStyleAspect = false;
    // @AJ support
    if (typeDeclaration.annotations != null) {
      for (int i = 0; i < typeDeclaration.annotations.length; i++) {
        Annotation annotation = typeDeclaration.annotations[i];
        if (Arrays.equals(annotation.type.getTypeBindingPublic(scope).signature(),
            "Lorg/aspectj/lang/annotation/Aspect;".toCharArray())) {
          kind = IProgramElement.Kind.ASPECT;
          if (!(typeDeclaration instanceof AspectDeclaration)) {
            isAnnotationStyleAspect = true;
View Full Code Here


    boolean isAnnotationStyleAspect = false;
    // @AJ support
    if (memberTypeDeclaration.annotations != null) {
      for (int i = 0; i < memberTypeDeclaration.annotations.length; i++) {
        Annotation annotation = memberTypeDeclaration.annotations[i];
        if (Arrays.equals(annotation.type.getTypeBindingPublic(scope).signature(),
            "Lorg/aspectj/lang/annotation/Aspect;".toCharArray())) {
          kind = IProgramElement.Kind.ASPECT;
          if (!(memberTypeDeclaration instanceof AspectDeclaration)) {
            isAnnotationStyleAspect = true;
View Full Code Here

    // @AJ support
    boolean isAnnotationStyleAspect = false;
    if (memberTypeDeclaration.annotations != null) {
      for (int i = 0; i < memberTypeDeclaration.annotations.length; i++) {
        Annotation annotation = memberTypeDeclaration.annotations[i];
        if (Arrays.equals(annotation.type.getTypeBindingPublic(scope).signature(),
            "Lorg/aspectj/lang/annotation/Aspect;".toCharArray())) {
          kind = IProgramElement.Kind.ASPECT;
          if (!(memberTypeDeclaration instanceof AspectDeclaration)) {
            isAnnotationStyleAspect = true;
View Full Code Here

  private boolean isAtAspectJ(TypeDeclaration typeDec) {
    if (typeDec.annotations == null)
      return false;

    for (int i = 0; i < typeDec.annotations.length; i++) {
      Annotation annotation = typeDec.annotations[i];
      if ("Lorg/aspectj/lang/annotation/Aspect;".equals(new String(annotation.resolvedType.signature()))) {
        return true;
      }
    }
    return false;
View Full Code Here

   * Called from the AtAspectJVisitor to create the @Pointcut annotation (and corresponding method) for this pointcut
   *
   */
  public void addAtAspectJAnnotations() {
    String argNames = buildArgNameRepresentation();
    Annotation pcutAnnotation = AtAspectJAnnotationFactory.createPointcutAnnotation(getPointcutText(), argNames,
        declarationSourceStart);

    if (annotations == null) {
      annotations = new Annotation[] { pcutAnnotation };
    } else {
View Full Code Here

          }
        }
      }
    }

    Annotation aspectAnnotation = ajAnnotations.aspectAnnotation;

    int[] pcLoc = new int[2];
    String perClause = getStringLiteralFor("value", aspectAnnotation, pcLoc);
    // AspectDeclaration aspectDecl = new
    // AspectDeclaration(typeDecl.compilationResult);
View Full Code Here

  /**
   * Add either the @Before, @After, @Around, @AfterReturning or @AfterThrowing annotation
   */
  public void addAtAspectJAnnotations() {
    Annotation adviceAnnotation = null;
    String pointcutExpression = pointcutDesignator.getPointcut().toString();
    String extraArgumentName = "";
    if (extraArgument != null) {
      extraArgumentName = new String(extraArgument.name);
    }
View Full Code Here

    // ??? we might need to set parameters to be empty
    this.returnType = TypeReference.baseTypeReference(T_void, 0);
  }

  public void addAtAspectJAnnotations() {
    Annotation annotation = null;
    if (declareDecl instanceof DeclareAnnotation) {
      DeclareAnnotation da = (DeclareAnnotation) declareDecl;
      String patternString = da.getPatternAsString();
      String annString = da.getAnnotationString();
      String kind = da.getKind().toString();
View Full Code Here

  /**
   * AMC - this method is called by the AtAspectJVisitor during beforeCompilation processing in the AjCompiler adapter. We use
   * this hook to add in the @AspectJ annotations.
   */
  public void addAtAspectJAnnotations() {
    Annotation atAspectAnnotation = AtAspectJAnnotationFactory.createAspectAnnotation(perClause.toDeclarationString(),
        declarationSourceStart);
    Annotation privilegedAnnotation = null;
    if (isPrivileged) {
      privilegedAnnotation = AtAspectJAnnotationFactory.createPrivilegedAnnotation(declarationSourceStart);
    }
    Annotation[] toAdd = new Annotation[isPrivileged ? 2 : 1];
    toAdd[0] = atAspectAnnotation;
View Full Code Here

  protected abstract char[] getPrefix();
 
 
  public void addAtAspectJAnnotations() {
    if (munger == null) return;
    Annotation ann = AtAspectJAnnotationFactory.createITDAnnotation(
        munger.getSignature().getDeclaringType().getName().toCharArray(),
        declaredModifiers,declaredSelector,declarationSourceStart);
    AtAspectJAnnotationFactory.addAnnotation(this,ann,this.scope);
  }
View Full Code Here

TOP

Related Classes of org.aspectj.org.eclipse.jdt.internal.compiler.ast.Annotation

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.