Package org.aspectj.weaver.ast

Examples of org.aspectj.weaver.ast.Var


   * @see org.aspectj.weaver.Shadow#getWithinCodeAnnotationVar(org.aspectj.weaver.UnresolvedType)
   */
  public Var getWithinCodeAnnotationVar(UnresolvedType forAnnotationType) {
    ResolvedType annType = forAnnotationType.resolve(world);
    if (withinCodeAnnotationVar.get(annType) == null) {
      Var v = ReflectionVar.createWithinCodeAnnotationVar(annType, this.annotationFinder);
      withinCodeAnnotationVar.put(annType, v);
    }
    return (Var) withinCodeAnnotationVar.get(annType);
  }
View Full Code Here


  }

  public Var getKindedAnnotationVar(UnresolvedType forAnnotationType) {
    ResolvedType annType = forAnnotationType.resolve(world);
    if (annotationVar.get(annType) == null) {
      Var v = ReflectionVar.createAtAnnotationVar(annType, this.annotationFinder);
      annotationVar.put(annType, v);
    }
    return (Var) annotationVar.get(annType);
  }
View Full Code Here

   * @see org.aspectj.weaver.Shadow#getWithinAnnotationVar(org.aspectj.weaver.UnresolvedType)
   */
  public Var getWithinAnnotationVar(UnresolvedType forAnnotationType) {
    ResolvedType annType = forAnnotationType.resolve(world);
    if (withinAnnotationVar.get(annType) == null) {
      Var v = ReflectionVar.createWithinAnnotationVar(annType, this.annotationFinder);
      withinAnnotationVar.put(annType, v);
    }
    return (Var) withinAnnotationVar.get(annType);
  }
View Full Code Here

   * @see org.aspectj.weaver.Shadow#getWithinCodeAnnotationVar(org.aspectj.weaver.UnresolvedType)
   */
  public Var getWithinCodeAnnotationVar(UnresolvedType forAnnotationType) {
    ResolvedType annType = forAnnotationType.resolve(world);
    if (withinCodeAnnotationVar.get(annType) == null) {
      Var v = ReflectionVar.createWithinCodeAnnotationVar(annType, this.annotationFinder);
      withinCodeAnnotationVar.put(annType, v);
    }
    return (Var) withinCodeAnnotationVar.get(annType);
  }
View Full Code Here

    if (!hasThis()) {
      throw new IllegalStateException("no this");
    }
    initializeThisAnnotationVars(); // FIXME asc Why bother with this if we always return one?
    // Even if we can't find one, we have to return one as we might have this annotation at runtime
    Var v = thisAnnotationVars.get(forAnnotationType);
    if (v == null) {
      v = new TypeAnnotationAccessVar(forAnnotationType.resolve(world), (BcelVar) getThisVar());
    }
    return v;
  }
View Full Code Here

  public Var getTargetAnnotationVar(UnresolvedType forAnnotationType) {
    if (!hasTarget()) {
      throw new IllegalStateException("no target");
    }
    initializeTargetAnnotationVars(); // FIXME asc why bother with this if we always return one?
    Var v = targetAnnotationVars.get(forAnnotationType);
    // Even if we can't find one, we have to return one as we might have this annotation at runtime
    if (v == null) {
      v = new TypeAnnotationAccessVar(forAnnotationType.resolve(world), (BcelVar) getTargetVar());
    }
    return v;
View Full Code Here

              }

        ResolvedType rAnnType = ap.getAnnotationType().resolve(shadow.getIWorld());
        if (ap instanceof BindingAnnotationTypePattern) {
          BindingAnnotationTypePattern btp = (BindingAnnotationTypePattern)ap;
          Var annvar = shadow.getArgAnnotationVar(argsIndex,rAnnType);
          state.set(btp.getFormalIndex(),annvar);
        }
        if (!ap.matches(rArgType).alwaysTrue()) {
          // we need a test...
          ret = Test.makeAnd(ret,
View Full Code Here

  protected Test findResidueInternal(Shadow shadow, ExposedState state) {
   
    if (annotationTypePattern instanceof BindingAnnotationTypePattern) {
      BindingAnnotationTypePattern btp = (BindingAnnotationTypePattern)annotationTypePattern;
      UnresolvedType annotationType = btp.getAnnotationType();
      Var var = shadow.getKindedAnnotationVar(annotationType);
     
      // This should not happen, we shouldn't have gotten this far
      // if we weren't going to find the annotation
      if (var == null) throw new BCException("Impossible! annotation=["+annotationType+
                                         "]  shadow=["+shadow+" at "+shadow.getSourceLocation()+
View Full Code Here

  protected Test findResidueInternal(Shadow shadow, ExposedState state) {
   
    if (annotationTypePattern instanceof BindingAnnotationTypePattern) {
      BindingAnnotationTypePattern btp = (BindingAnnotationTypePattern)annotationTypePattern;
      UnresolvedType annotationType = btp.annotationType;
      Var var = shadow.getWithinCodeAnnotationVar(annotationType);
 
      // This should not happen, we shouldn't have gotten this far
      // if we weren't going to find the annotation
      if (var == null)
        throw new BCException("Impossible! annotation=["+annotationType+
View Full Code Here

   * @see org.aspectj.weaver.Shadow#getKindedAnnotationVar(org.aspectj.weaver.UnresolvedType)
   */
  public Var getKindedAnnotationVar(UnresolvedType forAnnotationType) {
    ResolvedType annType = forAnnotationType.resolve(world);
    if (annotationVar.get(annType) == null) {
      Var v = ReflectionVar.createAtAnnotationVar(annType,this.annotationFinder);
      annotationVar.put(annType,v);
    }
    return (Var) annotationVar.get(annType);
  }
View Full Code Here

TOP

Related Classes of org.aspectj.weaver.ast.Var

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.