Package net.sourceforge.javautil.bytecode.api.IBytecodeAnnotation

Examples of net.sourceforge.javautil.bytecode.api.IBytecodeAnnotation.AnnotationValue


    IBytecodeResolvable enumType = context.getResolutionPool().resolve(Enum.class.getName());
    IBytecodeResolvable annoType = context.getResolutionPool().resolve(Enum.class.getName());

    Map<String, AnnotationValue> values = ba.getValues();
    for (String name : values.keySet()) {
      AnnotationValue value = values.get(name);
      IBytecodeResolvable avt = context.getResolutionPool().resolve( value.getValue().getClass().getName() );
      if (avt.isInstanceof(context.getResolutionPool(), enumType)) {
        // TODO: support enums
      } else if (avt.getType().isArray() &&
                 context.getResolutionPool().resolve(
                     avt.getType().getComponentType().getClassName()
                 ).isInstanceof(context.getResolutionPool(), annoType)) {
        // TODO: support annotation arrays
      } else {
        av.visit(name, value.getValue());
      }
    }
   
    av.visitEnd();
  }
View Full Code Here

TOP

Related Classes of net.sourceforge.javautil.bytecode.api.IBytecodeAnnotation.AnnotationValue

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.