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

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


          }
        }
      }

      // fix up declare parents - may need to attach them to existing ones
      TypeReference sr = sourceTypeBinding.scope.referenceContext.superclass;
      TypeReference[] trs = sourceTypeBinding.scope.referenceContext.superInterfaces;
      List<ExactTypePattern> newParents = additionalParents.get(sourceTypeBinding);
      StringBuffer extendsString = new StringBuffer();
      StringBuffer implementsString = new StringBuffer();
      if (newParents != null && newParents.size() > 0) {
View Full Code Here


    adviceDecl.sourceStart = (int) (pos >>> 32);
       
    // but put in a placeholder name
        adviceDecl.selector = new char[] {'a','j','c','$','a','d','v','i','c','e'};

    TypeReference returnType = getTypeReference(intStack[intPtr--]);
   
    //modifiers
    adviceDecl.declarationSourceStart = intStack[intPtr--];
    adviceDecl.modifiers = intStack[intPtr--];
View Full Code Here

    if (hasTypeParameters) {
      pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
    } else {
      consumeClassOrInterfaceName();
    }
    TypeReference onType = getTypeReference(0);


    TypeReference returnType = getTypeReference(intStack[intPtr--]);
    this.display();

    int decSourceStart = intStack[intPtr--];
    int fieldModifiers = intStack[intPtr--];
View Full Code Here

      pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
      //consumeClassOrInterfaceName();
    } else {
      consumeClassOrInterfaceName();     
    }
    TypeReference onType = getTypeReference(0);

    //type
    md.returnType = getTypeReference(intStack[intPtr--]);

    // consume method type parameters
View Full Code Here

    //onType
    if (!hasTargetTypeParameters) {
      consumeClassOrInterfaceName();     
    }
    TypeReference onType = getTypeReference(0);
    declarationFactory.setOnType(md,onType);

    println("got onType: " + onType);
    this.display();

    intPtr--; // pop new info
    //type
    md.returnType = TypeReference.baseTypeReference(T_void, 0); //getTypeReference(intStack[intPtr--]);
   
    if (hasConstructorTypeParameters) {
      // consume type parameters
      int tp_length = this.genericsLengthStack[this.genericsLengthPtr--];
      this.genericsPtr -= tp_length;
      System.arraycopy(this.genericsStack, this.genericsPtr + 1, md.typeParameters = new TypeParameter[tp_length], 0, tp_length);
    }
   
    //modifiers
    md.declarationSourceStart = intStack[intPtr--];
    declarationFactory.setDeclaredModifiers(md,intStack[intPtr--]);
    //md.modifiers = intStack[intPtr--];

    // consume annotations
    int length;
    if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
      System.arraycopy(
        this.expressionStack,
        (this.expressionPtr -= length) + 1,
        md.annotations = new Annotation[length],
        0,
        length);
    }

    //highlight starts at selector start
    //md.sourceStart = (int) (selectorSource >>> 32);
    md.sourceStart = onType.sourceStart;
    pushOnAstStack(md);
    md.sourceEnd = lParenPos;
    md.bodyStart = lParenPos + 1;
    listLength = 0;
    // initialize listLength before reading parameters/throws

    declarationFactory.setSelector(md,
      (new String(CharOperation.concatWith(onType.getTypeName(), '_')) + "_new").toCharArray());
   

    // recovery
    if (currentElement != null) {
      if (currentElement instanceof RecoveredType
View Full Code Here

    consumePseudoToken(Modifier.toString(modifiers), 0, true);
    modifiers = ClassFileConstants.AccDefault;
  }

  protected void consumePseudoTokenPrimitiveType() {
    TypeReference type = getTypeReference(0);

    ASTNode tok = declarationFactory.createPseudoToken(this, type.toString(), true);
    tok.sourceStart = type.sourceStart;
    tok.sourceEnd = type.sourceEnd;
    pushOnAstStack(tok);
  }
View Full Code Here

      pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
      //consumeClassOrInterfaceName();
    } else {
      consumeClassOrInterfaceName();     
    }
    TypeReference onType = getTypeReference(0);

    declarationFactory.setOnType(typeDecl,onType);
 
    //compute the declaration source too
    // 'class' and 'interface' push two int positions: the beginning of the class token and its end.
View Full Code Here

    if (!(typeDecl instanceof AspectDeclaration)) {
      if (ajAnnotations.hasAspectAnnotation) {
        validateAspectDeclaration(typeDecl);
      } else {
        // check that class doesn't extend aspect
        TypeReference parentRef = typeDecl.superclass;
        if (parentRef != null) {
          TypeBinding parentBinding = parentRef.resolvedType;
          if (parentBinding instanceof SourceTypeBinding) {
            SourceTypeBinding parentSTB = (SourceTypeBinding) parentBinding;
            if (parentSTB.scope != null) {
View Full Code Here

    // if (!Modifier.isPublic(typeDecl.modifiers)) {
    // typeDecl.scope.problemReporter().signalError(typeDecl.sourceStart,
    // typeDecl.sourceEnd,"@Aspect class must be public");
    // }

    TypeReference parentRef = typeDecl.superclass;
    if (parentRef != null) {
      TypeBinding parentBinding = parentRef.resolvedType;
      if (parentBinding instanceof SourceTypeBinding) {
        SourceTypeBinding parentSTB = (SourceTypeBinding) parentBinding;
        if (parentSTB.scope != null) { // scope is null if its a
View Full Code Here

    String[] argumentNames = method.getParameterNames();
    int argumentCount = argumentTypeNames == null ? 0 : argumentTypeNames.length;
    methodDeclaration.arguments = new Argument[argumentCount];
    for (int i = 0; i < argumentCount; i++) {
      String argumentTypeName = argumentTypeNames[i];
      TypeReference typeReference = createTypeReference(Signature.toString(argumentTypeName).toCharArray());
      if (isVarargs && i == argumentCount-1) {
        typeReference.bits |= ASTNode.IsVarArgs;
      }
      methodDeclaration.arguments[i] = new Argument(
        argumentNames[i].toCharArray(),
View Full Code Here

TOP

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

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.