Package org.aspectj.asm.internal

Examples of org.aspectj.asm.internal.AspectJElementHierarchy


      // this is very odd return behavior trying to keep everyone happy

      // can we remove it from the model now? we know it contains no relationship endpoints...
      AsmManager model = world.getModelAsAsmManager();
      if (world.isMinimalModel() && model != null && !classType.isAspect()) {
        AspectJElementHierarchy hierarchy = (AspectJElementHierarchy) model.getHierarchy();
        String pkgname = classType.getResolvedTypeX().getPackageName();
        String tname = classType.getResolvedTypeX().getSimpleBaseName();
        IProgramElement typeElement = hierarchy.findElementForType(pkgname, tname);
        if (typeElement != null && hasInnerType(typeElement)) {
          // Cannot remove it right now (has inner type), schedule it
          // for possible deletion later if all inner types are
          // removed
          candidatesForRemoval.add(typeElement);
        }
        if (typeElement != null && !hasInnerType(typeElement)) {
          IProgramElement parent = typeElement.getParent();
          // parent may have children: PACKAGE DECL, IMPORT-REFERENCE, TYPE_DECL
          if (parent != null) {
            // if it was the only type we should probably remove
            // the others too.
            parent.removeChild(typeElement);
            if (parent.getKind().isSourceFile()) {
              removeSourceFileIfNoMoreTypeDeclarationsInside(hierarchy, typeElement, parent);
            } else {
              hierarchy.forget(null, typeElement);
              // At this point, the child has been removed. We
              // should now check if the parent is in our
              // 'candidatesForRemoval' set. If it is then that
              // means we were going to remove it but it had a
              // child. Now we can check if it still has a child -
View Full Code Here


      // this is very odd return behavior trying to keep everyone happy

      // can we remove it from the model now? we know it contains no relationship endpoints...
      AsmManager model = world.getModelAsAsmManager();
      if (world.isMinimalModel() && model != null && !classType.isAspect()) {
        AspectJElementHierarchy hierarchy = (AspectJElementHierarchy) model.getHierarchy();
        String pkgname = classType.getResolvedTypeX().getPackageName();
        String tname = classType.getResolvedTypeX().getSimpleBaseName();
        IProgramElement typeElement = hierarchy.findElementForType(pkgname, tname);
        if (typeElement != null && hasInnerType(typeElement)) {
          // Cannot remove it right now (has inner type), schedule it
          // for possible deletion later if all inner types are
          // removed
          candidatesForRemoval.add(typeElement);
        }
        if (typeElement != null && !hasInnerType(typeElement)) {
          IProgramElement parent = typeElement.getParent();
          // parent may have children: PACKAGE DECL, IMPORT-REFERENCE, TYPE_DECL
          if (parent != null) {
            // if it was the only type we should probably remove
            // the others too.
            parent.removeChild(typeElement);
            if (parent.getKind().isSourceFile()) {
              removeSourceFileIfNoMoreTypeDeclarationsInside(hierarchy, typeElement, parent);
            } else {
              hierarchy.forget(null, typeElement);
              // At this point, the child has been removed. We
              // should now check if the parent is in our
              // 'candidatesForRemoval' set. If it is then that
              // means we were going to remove it but it had a
              // child. Now we can check if it still has a child -
View Full Code Here

    if (forceSingletonBehaviour && lastActiveStructureModel != null) {
      return lastActiveStructureModel;
    }
    AsmManager asm = new AsmManager();
    asm.inpathMap = inpathMap;
    asm.hierarchy = new AspectJElementHierarchy(asm);
    asm.mapper = new RelationshipMap();
    asm.handleProvider = new JDTLikeHandleProvider(asm);
    // call initialize on the handleProvider when we create a new ASM
    // to give handleProviders the chance to reset any state
    asm.handleProvider.initialize();
View Full Code Here

    if (forceSingletonBehaviour && lastActiveStructureModel != null) {
      return lastActiveStructureModel;
    }
    AsmManager asm = new AsmManager();
    asm.inpathMap = inpathMap;
    asm.hierarchy = new AspectJElementHierarchy(asm);
    asm.mapper = new RelationshipMap(asm.hierarchy);
    asm.handleProvider = new JDTLikeHandleProvider(asm);
    // call initialize on the handleProvider when we create a new ASM
    // to give handleProviders the chance to reset any state
    asm.handleProvider.initialize();
View Full Code Here

TOP

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

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.