Package org.aspectj.weaver

Examples of org.aspectj.weaver.NewMethodTypeMunger


  // FIXME asc refactor this to neaten it up
  public LazyMethodGen locateAnnotationHolderForMethodCtorMunger(LazyClassGen clazz, ConcreteTypeMunger methodCtorMunger) {
    ResolvedTypeMunger rtMunger = methodCtorMunger.getMunger();
    ResolvedMember lookingFor = null;
    if (rtMunger instanceof NewMethodTypeMunger) {
      NewMethodTypeMunger nftm = (NewMethodTypeMunger) rtMunger;
      lookingFor = AjcMemberMaker.interMethodDispatcher(nftm.getSignature(), methodCtorMunger.getAspectType());
    } else if (rtMunger instanceof NewConstructorTypeMunger) {
      NewConstructorTypeMunger nftm = (NewConstructorTypeMunger) rtMunger;
      lookingFor = AjcMemberMaker.postIntroducedConstructor(methodCtorMunger.getAspectType(), nftm.getSignature()
          .getDeclaringType(), nftm.getSignature().getParameterTypes());
    } else {
      throw new BCException("Not sure what this is: " + methodCtorMunger);
    }
    String name = lookingFor.getName();
    String paramSignature = lookingFor.getParameterSignature();
View Full Code Here


          ConcreteTypeMunger element = iterator.next();
          if (element.getMunger() instanceof NewFieldTypeMunger) {
            NewFieldTypeMunger nftm = (NewFieldTypeMunger) element.getMunger();
            itdMatch = declA.matches(nftm.getSignature(), world);
          } else if (element.getMunger() instanceof NewMethodTypeMunger) {
            NewMethodTypeMunger nmtm = (NewMethodTypeMunger) element.getMunger();
            itdMatch = declA.matches(nmtm.getSignature(), world);
          } else if (element.getMunger() instanceof NewConstructorTypeMunger) {
            NewConstructorTypeMunger nctm = (NewConstructorTypeMunger) element.getMunger();
            itdMatch = declA.matches(nctm.getSignature(), world);
          }
        }
View Full Code Here

    sig.resetName(new String(declaredSelector));
    int resetModifiers = declaredModifiers;
    if (binding.isVarargs())
      resetModifiers = resetModifiers | Constants.ACC_VARARGS;
    sig.resetModifiers(resetModifiers);
    NewMethodTypeMunger myMunger = new NewMethodTypeMunger(sig, null, typeVariableAliases);
    setMunger(myMunger);
    ResolvedType aspectType = factory.fromEclipse(classScope.referenceContext.binding);
    ResolvedMember me = myMunger.getInterMethodBody(aspectType);
    this.selector = binding.selector = me.getName().toCharArray();
    return new EclipseTypeMunger(factory, myMunger, aspectType, this);
  }
View Full Code Here

  // FIXME asc refactor this to neaten it up
  public LazyMethodGen locateAnnotationHolderForMethodCtorMunger(LazyClassGen clazz, ConcreteTypeMunger methodCtorMunger) {
    ResolvedTypeMunger rtMunger = methodCtorMunger.getMunger();
    ResolvedMember lookingFor = null;
    if (rtMunger instanceof NewMethodTypeMunger) {
      NewMethodTypeMunger nftm = (NewMethodTypeMunger) rtMunger;
      lookingFor = AjcMemberMaker.interMethodDispatcher(nftm.getSignature(), methodCtorMunger.getAspectType());
    } else if (rtMunger instanceof NewConstructorTypeMunger) {
      NewConstructorTypeMunger nftm = (NewConstructorTypeMunger) rtMunger;
      lookingFor = AjcMemberMaker.postIntroducedConstructor(methodCtorMunger.getAspectType(), nftm.getSignature()
          .getDeclaringType(), nftm.getSignature().getParameterTypes());
    } else {
      throw new BCException("Not sure what this is: " + methodCtorMunger);
    }
    String name = lookingFor.getName();
    String paramSignature = lookingFor.getParameterSignature();
View Full Code Here

          ConcreteTypeMunger element = iterator.next();
          if (element.getMunger() instanceof NewFieldTypeMunger) {
            NewFieldTypeMunger nftm = (NewFieldTypeMunger) element.getMunger();
            itdMatch = declA.matches(nftm.getSignature(), world);
          } else if (element.getMunger() instanceof NewMethodTypeMunger) {
            NewMethodTypeMunger nmtm = (NewMethodTypeMunger) element.getMunger();
            itdMatch = declA.matches(nmtm.getSignature(), world);
          } else if (element.getMunger() instanceof NewConstructorTypeMunger) {
            NewConstructorTypeMunger nctm = (NewConstructorTypeMunger) element.getMunger();
            itdMatch = declA.matches(nctm.getSignature(), world);
          }
        }
View Full Code Here

  // FIXME asc refactor this to neaten it up
  public LazyMethodGen locateAnnotationHolderForMethodCtorMunger(LazyClassGen clazz, ConcreteTypeMunger methodCtorMunger) {
    ResolvedTypeMunger rtMunger = methodCtorMunger.getMunger();
    ResolvedMember lookingFor = null;
    if (rtMunger instanceof NewMethodTypeMunger) {
      NewMethodTypeMunger nftm = (NewMethodTypeMunger) rtMunger;
      lookingFor = AjcMemberMaker.interMethodDispatcher(nftm.getSignature(), methodCtorMunger.getAspectType());
    } else if (rtMunger instanceof NewConstructorTypeMunger) {
      NewConstructorTypeMunger nftm = (NewConstructorTypeMunger) rtMunger;
      lookingFor = AjcMemberMaker.postIntroducedConstructor(methodCtorMunger.getAspectType(), nftm.getSignature()
          .getDeclaringType(), nftm.getSignature().getParameterTypes());
    } else {
      throw new BCException("Not sure what this is: " + methodCtorMunger);
    }
    String name = lookingFor.getName();
    String paramSignature = lookingFor.getParameterSignature();
View Full Code Here

          ConcreteTypeMunger element = iterator.next();
          if (element.getMunger() instanceof NewFieldTypeMunger) {
            NewFieldTypeMunger nftm = (NewFieldTypeMunger) element.getMunger();
            itdMatch = declA.matches(nftm.getSignature(), world);
          } else if (element.getMunger() instanceof NewMethodTypeMunger) {
            NewMethodTypeMunger nmtm = (NewMethodTypeMunger) element.getMunger();
            itdMatch = declA.matches(nmtm.getSignature(), world);
          } else if (element.getMunger() instanceof NewConstructorTypeMunger) {
            NewConstructorTypeMunger nctm = (NewConstructorTypeMunger) element.getMunger();
            itdMatch = declA.matches(nctm.getSignature(), world);
          }
        }
View Full Code Here

  }
 
  // FIXME asc refactor this to neaten it up
  public LazyMethodGen locateAnnotationHolderForMethodCtorMunger(LazyClassGen clazz,BcelTypeMunger methodCtorMunger) {
    if (methodCtorMunger.getMunger() instanceof NewMethodTypeMunger) {
      NewMethodTypeMunger nftm = (NewMethodTypeMunger)methodCtorMunger.getMunger();
     
      ResolvedMember lookingFor = AjcMemberMaker.interMethodDispatcher(nftm.getSignature(),methodCtorMunger.getAspectType());
     
      List meths = clazz.getMethodGens();
      for (Iterator iter = meths.iterator(); iter.hasNext();) {
        LazyMethodGen element = (LazyMethodGen) iter.next();
        if (element.getName().equals(lookingFor.getName()) && element.getParameterSignature().equals(lookingFor.getParameterSignature())) return element;
      }
      return null;
    } else if (methodCtorMunger.getMunger() instanceof NewConstructorTypeMunger) {
      NewConstructorTypeMunger nftm = (NewConstructorTypeMunger)methodCtorMunger.getMunger();
      ResolvedMember lookingFor =AjcMemberMaker.postIntroducedConstructor(methodCtorMunger.getAspectType(),nftm.getSignature().getDeclaringType(),nftm.getSignature().getParameterTypes());
      List meths = clazz.getMethodGens();
      for (Iterator iter = meths.iterator(); iter.hasNext();) {
        LazyMethodGen element = (LazyMethodGen) iter.next();
        if (element.getName().equals(lookingFor.getName()) && element.getParameterSignature().equals(lookingFor.getParameterSignature())) return element;
      }
View Full Code Here

          BcelTypeMunger element = (BcelTypeMunger) iterator.next();
          if (element.getMunger() instanceof NewFieldTypeMunger) {
            NewFieldTypeMunger nftm = (NewFieldTypeMunger)element.getMunger();
            itdMatch = declA.getSignaturePattern().matches(nftm.getSignature(),world,false);
            }else if (element.getMunger() instanceof NewMethodTypeMunger) {
            NewMethodTypeMunger nmtm = (NewMethodTypeMunger)element.getMunger();
            itdMatch = declA.getSignaturePattern().matches(nmtm.getSignature(),world,false);             
          } else if (element.getMunger() instanceof NewConstructorTypeMunger) {
            NewConstructorTypeMunger nctm = (NewConstructorTypeMunger)element.getMunger();
            itdMatch = declA.getSignaturePattern().matches(nctm.getSignature(),world,false);             
          }
        }
View Full Code Here

    ResolvedMember sig = factory.makeResolvedMemberForITD(binding,onTypeBinding,interTypeScope.getRecoveryAliases());
    sig.resetName(new String(declaredSelector));
    int resetModifiers = declaredModifiers;
    if (binding.isVarargs())  resetModifiers = resetModifiers | Constants.ACC_VARARGS;
    sig.resetModifiers(resetModifiers);
    NewMethodTypeMunger myMunger = new NewMethodTypeMunger(sig, null, typeVariableAliases);
    setMunger(myMunger);
    ResolvedType aspectType = factory.fromEclipse(classScope.referenceContext.binding);
    ResolvedMember me =
      myMunger.getInterMethodBody(aspectType);
    this.selector = binding.selector = me.getName().toCharArray();
    return new EclipseTypeMunger(factory, myMunger, aspectType, this);
  }
View Full Code Here

TOP

Related Classes of org.aspectj.weaver.NewMethodTypeMunger

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.