Examples of TypeReference


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

      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

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

    //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

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

    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

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

      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

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

    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

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

    // 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

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

    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

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

   * the given position in the source file
   */
  public static Annotation createAspectAnnotation(String perclause, int pos) {
    char[][] typeName = new char[][] {org,aspectj,lang,annotation,aspect};
    long[] positions = new long[] {pos,pos,pos,pos,pos};
    TypeReference orgAspectJLangAnnotationAspect = new QualifiedTypeReference(typeName,positions);
    NormalAnnotation atAspectAnnotation = new NormalAnnotation(orgAspectJLangAnnotationAspect,pos);
    if (!perclause.equals("")) {
      // we have to set the value
      Expression perclauseExpr = new StringLiteral(perclause.toCharArray(),pos,pos,1);
      MemberValuePair[] mvps = new MemberValuePair[1];
View Full Code Here

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

  }
 
  public static Annotation createPrivilegedAnnotation(int pos) {
    char[][] typeName = new char[][] {org,aspectj,internal,lang,annotation,privileged};
    long[] positions = new long[] {pos,pos,pos,pos,pos,pos};
    TypeReference annType = new QualifiedTypeReference(typeName,positions);
    NormalAnnotation ann = new NormalAnnotation(annType,pos);
    return ann;
  }
View Full Code Here

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

  }

  public static Annotation createBeforeAnnotation(String pointcutExpression, String argNames, int pos) {
    char[][] typeName = new char[][] {org,aspectj,lang,annotation,before};
    long[] positions = new long[] {pos,pos,pos,pos,pos};
    TypeReference annType = new QualifiedTypeReference(typeName,positions);
    NormalAnnotation ann = new NormalAnnotation(annType,pos);
    Expression pcExpr = new StringLiteral(pointcutExpression.toCharArray(),pos,pos,1);
    MemberValuePair[] mvps = new MemberValuePair[2];
    mvps[0] = new MemberValuePair("value".toCharArray(),pos,pos,pcExpr);
    Expression argNamesExpr = new StringLiteral(argNames.toCharArray(),pos,pos,1);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.