Package org.aspectj.asm.internal

Examples of org.aspectj.asm.internal.ProgramElement


    // 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(
            "",
            IProgramElement.Kind.ERROR,
            makeLocation(methodDeclaration),
            (sig!=null?sig.getModifiers():0),
            "",
            new ArrayList())
   
    } else {
      peNode = new ProgramElement(
        "",
        IProgramElement.Kind.ERROR,
        makeLocation(methodDeclaration),
        methodDeclaration.modifiers,
        "",
View Full Code Here


    if (dotIndex != -1) {
      currPackageImport = importRef.toString().substring(0, dotIndex);
    }
    if (!((ProgramElement)stack.peek()).getPackageName().equals(currPackageImport)) {
   
      IProgramElement peNode = new ProgramElement(
        new String(importRef.toString()),
        IProgramElement.Kind.IMPORT_REFERENCE, 
        makeLocation(importRef),
        0,
        "",
        new ArrayList())
     
      ProgramElement imports = (ProgramElement)((ProgramElement)stack.peek()).getChildren().get(0);
      imports.addChild(0, peNode);
      stack.push(peNode);
    }
    return true;  
  }
View Full Code Here

  }

  public boolean visit(FieldDeclaration fieldDeclaration, MethodScope scope) {
      IProgramElement peNode = null;
      if (fieldDeclaration.type == null) { // The field represents an enum value
        peNode = new ProgramElement(
      new String(fieldDeclaration.name),IProgramElement.Kind.ENUM_VALUE, 
      makeLocation(fieldDeclaration),   fieldDeclaration.modifiers,
      "", new ArrayList());
      peNode.setCorrespondingType(fieldDeclaration.binding.type.debugName());
    } else {   
      peNode = new ProgramElement(
      new String(fieldDeclaration.name),IProgramElement.Kind.FIELD, 
      makeLocation(fieldDeclaration),   fieldDeclaration.modifiers,
      "", new ArrayList());
      peNode.setCorrespondingType(fieldDeclaration.type.toString());
    }
View Full Code Here

      argumentsSignature.append(constructorDeclaration.arguments[i].type);
      if (i+1<constructorDeclaration.arguments.length) argumentsSignature.append(",");
      }
    }
    argumentsSignature.append(")");
    IProgramElement peNode = new ProgramElement(
      new String(constructorDeclaration.selector)+argumentsSignature,
      IProgramElement.Kind.CONSTRUCTOR, 
      makeLocation(constructorDeclaration),
      constructorDeclaration.modifiers,
      "",
      new ArrayList())
   
    peNode.setModifiers(constructorDeclaration.modifiers);
    peNode.setSourceSignature(genSourceSignature(constructorDeclaration));
   
    // Fix to enable us to anchor things from ctor nodes
    if (constructorDeclaration.binding != null) {
      String memberName = "";
      String memberBytecodeSignature = "";
      try {
          EclipseFactory factory = ((AjLookupEnvironment)constructorDeclaration.scope.environment()).factory;
        Member member = factory.makeResolvedMember(constructorDeclaration.binding);
        memberName = member.getName();
        memberBytecodeSignature = member.getSignature();
      } catch (BCException bce) {  // bad type name
        memberName = "<undefined>";
      } catch (NullPointerException npe) {
        memberName = "<undefined>";
      }
      peNode.setBytecodeName(memberName);
      peNode.setBytecodeSignature(memberBytecodeSignature);
    }
   
   
    ((IProgramElement)stack.peek()).addChild(peNode);
    stack.push(peNode);
View Full Code Here

  private Initializer inInitializer = null;
  public boolean visit(Initializer initializer, MethodScope scope) {
    if (initializer == inInitializer) return false;
    inInitializer = initializer;
   
    IProgramElement peNode = new ProgramElement(
      "...",
      IProgramElement.Kind.INITIALIZER, 
      makeLocation(initializer),
      initializer.modifiers,
      "",
View Full Code Here

TOP

Related Classes of org.aspectj.asm.internal.ProgramElement

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.