Package org.aspectj.ajdt.internal.compiler.ast

Examples of org.aspectj.ajdt.internal.compiler.ast.InterTypeDeclaration


        node.setKind(IProgramElement.Kind.ERROR);
        node.setName(AsmRelationshipUtils.DECLARE_UNKNONWN);
      }

    } else if (methodDeclaration instanceof InterTypeDeclaration) {
      InterTypeDeclaration itd = (InterTypeDeclaration) methodDeclaration;
      String fqname = itd.getOnType().toString();
      if (fqname.indexOf(".") != -1) {
        // TODO the string handling round here is embarrassing
        node.addFullyQualifiedName(fqname + "." + new String(itd.getDeclaredSelector()));
        fqname = fqname.substring(fqname.lastIndexOf(".") + 1);
      }
      String name = fqname + "." + new String(itd.getDeclaredSelector());
      if (methodDeclaration instanceof InterTypeFieldDeclaration) {
        node.setKind(IProgramElement.Kind.INTER_TYPE_FIELD);
        node.setName(name);
      } else if (methodDeclaration instanceof InterTypeMethodDeclaration) {
        node.setKind(IProgramElement.Kind.INTER_TYPE_METHOD);
        node.setName(name);
      } else if (methodDeclaration instanceof InterTypeConstructorDeclaration) {
        node.setKind(IProgramElement.Kind.INTER_TYPE_CONSTRUCTOR);

        // StringBuffer argumentsSignature = new StringBuffer("fubar");
        // argumentsSignature.append("(");
        // if (methodDeclaration.arguments!=null && methodDeclaration.arguments.length>1) {
        //
        // for (int i = 1;i<methodDeclaration.arguments.length;i++) {
        // argumentsSignature.append(methodDeclaration.arguments[i]);
        // if (i+1<methodDeclaration.arguments.length) argumentsSignature.append(",");
        // }
        // }
        // argumentsSignature.append(")");
        // InterTypeConstructorDeclaration itcd = (InterTypeConstructorDeclaration)methodDeclaration;
        node.setName(itd.getOnType().toString() + "." + itd.getOnType().toString().replace('.', '_'));
      } else {
        node.setKind(IProgramElement.Kind.ERROR);
        node.setName(name);
      }
      node.setCorrespondingType(new String(itd.returnType.resolvedType.readableName()));
View Full Code Here


    setModifiers(methodDecl, methodDeclaration);

    // for ITD's use the declaredSelector
    final SimpleName methodName = new SimpleName(this.ast);
    if (methodDeclaration instanceof InterTypeDeclaration) {
      InterTypeDeclaration itd = (InterTypeDeclaration) methodDeclaration;
      methodName.internalSetIdentifier(new String(itd.getDeclaredSelector()));
    } else {
      methodName.internalSetIdentifier(new String(methodDeclaration.selector));
    }
    int start = methodDeclaration.sourceStart;
    int end = retrieveIdentifierEndPosition(start, methodDeclaration.sourceEnd);
View Full Code Here

    IProgramElement peNode = null;
    // For intertype decls, use the modifiers from the original signature,
    // not the generated method

    if (methodDeclaration instanceof InterTypeDeclaration) {
      InterTypeDeclaration itd = (InterTypeDeclaration) methodDeclaration;
      ResolvedMember sig = itd.getSignature();
      peNode = new ProgramElement(activeStructureModel, null, IProgramElement.Kind.ERROR, makeLocation(methodDeclaration),
          (sig != null ? sig.getModifiers() : 0), null, null);

    } else {
      peNode = new ProgramElement(activeStructureModel, null, IProgramElement.Kind.ERROR, makeLocation(methodDeclaration),
View Full Code Here

        node.setKind(IProgramElement.Kind.ERROR);
        node.setName(DECLARE_UNKNONWN);
      }
     
    } else if (methodDeclaration instanceof InterTypeDeclaration) {
      InterTypeDeclaration itd = (InterTypeDeclaration)methodDeclaration;
      String name = itd.getOnType().toString() + "." + new String(itd.getDeclaredSelector());
      if (methodDeclaration instanceof InterTypeFieldDeclaration) {
        node.setKind(IProgramElement.Kind.INTER_TYPE_FIELD);
        node.setName(name);
      } else if (methodDeclaration instanceof InterTypeMethodDeclaration) {
        node.setKind(IProgramElement.Kind.INTER_TYPE_METHOD);
        node.setName(name);
      } else if (methodDeclaration instanceof InterTypeConstructorDeclaration) {
        node.setKind(IProgramElement.Kind.INTER_TYPE_CONSTRUCTOR);
       
  //      StringBuffer argumentsSignature = new StringBuffer("fubar");
//        argumentsSignature.append("(");
//        if (methodDeclaration.arguments!=null && methodDeclaration.arguments.length>1) {
//   
//        for (int i = 1;i<methodDeclaration.arguments.length;i++) {
//          argumentsSignature.append(methodDeclaration.arguments[i]);
//          if (i+1<methodDeclaration.arguments.length) argumentsSignature.append(",");
//        }
//        }
//        argumentsSignature.append(")");
//        InterTypeConstructorDeclaration itcd = (InterTypeConstructorDeclaration)methodDeclaration;       
        node.setName(itd.getOnType().toString() + "." + itd.getOnType().toString()/*+argumentsSignature.toString()*/);
      } else {
        node.setKind(IProgramElement.Kind.ERROR);
        node.setName(name);
      }
      node.setCorrespondingType(itd.returnType.toString());
View Full Code Here

TOP

Related Classes of org.aspectj.ajdt.internal.compiler.ast.InterTypeDeclaration

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.