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

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


    boolean noProblems = true;
    int length = referenceContext.superInterfaces.length;
    ReferenceBinding[] interfaceBindings = new ReferenceBinding[length];
    int count = 0;
    nextInterface : for (int i = 0; i < length; i++) {
        TypeReference superInterfaceRef = referenceContext.superInterfaces[i];
      ReferenceBinding superInterface = findSupertype(superInterfaceRef);
      if (superInterface == null) { // detected cycle
        sourceType.tagBits |= TagBits.HierarchyHasProblems;
        noProblems = false;
        continue nextInterface;
View Full Code Here


   */
  public void ensureScopeSetup() {
    if (scopeSetup) return; // don't do it again
    MethodScope scope = this.scope;
   
    TypeReference ot = onType;
   
    // Work out the real base type
    if (ot instanceof ParameterizedSingleTypeReference) {
      ParameterizedSingleTypeReference pref = (ParameterizedSingleTypeReference) ot;
      long pos = (((long)pref.sourceStart) << 32) | pref.sourceEnd;
      ot = new SingleTypeReference(pref.token,pos);
    }

    // resolve it
    ReferenceBinding rb = (ReferenceBinding)ot.getTypeBindingPublic(scope.parent);

    if (rb instanceof TypeVariableBinding) {
      scope.problemReporter().signalError(sourceStart,sourceEnd,
            "Cannot make inter-type declarations on type variables, use an interface and declare parents");
      // to prevent disgusting cascading errors after this problem - lets null out what leads to them (pr105038)
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

        //FIXME AV - do we really want that
//        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 binarytypebinding (in AJ world, thats a subclass of SourceTypeBinding)
View Full Code Here

   * 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);
      MemberValuePair[] mvps = new MemberValuePair[1];
View Full Code Here

  }
 
  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

  }

  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);
    MemberValuePair[] mvps = new MemberValuePair[2];
    mvps[0] = new MemberValuePair("value".toCharArray(),pos,pos,pcExpr);
    Expression argNamesExpr = new StringLiteral(argNames.toCharArray(),pos,pos);
View Full Code Here

  }

  public static Annotation createAfterAnnotation(String pointcutExpression, String argNames, int pos) {
    char[][] typeName = new char[][] {org,aspectj,lang,annotation,after};
    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);
    MemberValuePair[] mvps = new MemberValuePair[2];
    mvps[0] = new MemberValuePair("value".toCharArray(),pos,pos,pcExpr);
    Expression argNamesExpr = new StringLiteral(argNames.toCharArray(),pos,pos);
View Full Code Here

  }

  public static Annotation createAfterReturningAnnotation(String pointcutExpression,  String argNames, String extraArgumentName, int pos) {
    char[][] typeName = new char[][] {org,aspectj,lang,annotation,afterReturning};
    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);
    MemberValuePair[] mvps = new MemberValuePair[3];
    mvps[0] = new MemberValuePair("pointcut".toCharArray(),pos,pos,pcExpr);
    Expression argExpr = new StringLiteral(extraArgumentName.toCharArray(),pos,pos);
View Full Code Here

  }

  public static Annotation createAfterThrowingAnnotation(String pointcutExpression, String argNames, String extraArgumentName, int pos) {
    char[][] typeName = new char[][] {org,aspectj,lang,annotation,afterThrowing};
    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);
    MemberValuePair[] mvps = new MemberValuePair[3];
    mvps[0] = new MemberValuePair("pointcut".toCharArray(),pos,pos,pcExpr);
    Expression argExpr = new StringLiteral(extraArgumentName.toCharArray(),pos,pos);
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.