Package org.aspectj.apache.bcel.classfile

Examples of org.aspectj.apache.bcel.classfile.Field


     * @param isEnclosingJp true to have the enclosingJpStaticPart
     * @return
     */
    public BcelVar getThisJoinPointStaticPartBcelVar(final boolean isEnclosingJp) {
      if (thisJoinPointStaticPartVar == null) {
        Field field = getEnclosingClass().getTjpField(this, isEnclosingJp);
       
          ResolvedType sjpType = null;
               if (world.isTargettingAspectJRuntime12()) { // TAG:SUPPORTING12: We didn't have different jpsp types in 1.2 
              sjpType = world.getCoreType(UnresolvedType.forName("org.aspectj.lang.JoinPoint$StaticPart"));
            } else {
              sjpType = isEnclosingJp?
                              world.getCoreType(UnresolvedType.forName("org.aspectj.lang.JoinPoint$EnclosingStaticPart")):
                              world.getCoreType(UnresolvedType.forName("org.aspectj.lang.JoinPoint$StaticPart"));
            }
            thisJoinPointStaticPartVar = new BcelFieldRef(
            sjpType,
            getEnclosingClass().getClassName(),
            field.getName());
//        getEnclosingClass().warnOnAddedStaticInitializer(this,munger.getSourceLocation());
      }
      return thisJoinPointStaticPartVar;
    }
View Full Code Here


        }


        // code style declare error / warning / implements / parents are field attributes
        for (int i = 0; i < javaClass.getFields().length; i++) {
            Field field = javaClass.getFields()[i];
            if (field.getName().startsWith(NameMangler.PREFIX)) continue// already dealt with by ajc...
            //FIXME alex optimize, this method struct will gets recreated for advice extraction
            AjAttributeFieldStruct fstruct = new AjAttributeFieldStruct(field, null, type, context, msgHandler);
            Attribute[] fattributes = field.getAttributes();

            for (int j = 0; j < fattributes.length; j++) {
                Attribute fattribute = fattributes[j];
                if (acceptAttribute(fattribute)) {
                    RuntimeAnnotations frvs = (RuntimeAnnotations) fattribute;
View Full Code Here

             2, index, cp.getConstantPool()));
    }
   
     addAnnotationsAsAttribute(cp);

    return new Field(access_flags, name_index, signature_index, getAttributes(),
         cp.getConstantPool());
  }
View Full Code Here

 
  /** @return field object with given name, or null
   */
  public Field containsField(String name) {
    for(Iterator e=field_vec.iterator(); e.hasNext(); ) {
      Field f = (Field)e.next();
      if(f.getName().equals(name))
  return f;
    }

    return null;
  }
View Full Code Here

    // Only munge one type!
    if (!gen.getType().equals(cflowCounterField.getDeclaringType())) return false;

    // Create the field declaration.
    // Something like: "public static final CflowCounter ajc$cflowCounter$0;"
    Field f = new FieldGen(cflowCounterField.getModifiers(),
        BcelWorld.makeBcelType(cflowCounterField.getReturnType()),
        cflowCounterField.getName(),
        gen.getConstantPoolGen()).getField();
   
      gen.addField(f,getSourceLocation());
View Full Code Here

TOP

Related Classes of org.aspectj.apache.bcel.classfile.Field

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.