Package org.aspectj.weaver

Examples of org.aspectj.weaver.SimpleAnnotationValue


  public static AnnotationValue generateElementValueForConstantExpression(Expression defaultValue, TypeBinding defaultValueBinding) {
    if (defaultValueBinding != null) {
      Constant c = defaultValue.constant;
      if (c instanceof IntConstant) {
        IntConstant iConstant = (IntConstant) c;
        return new SimpleAnnotationValue(ElementValue.PRIMITIVE_INT, new Integer(iConstant.intValue()));
      } else if (c instanceof BooleanConstant) {
        BooleanConstant iConstant = (BooleanConstant) c;
        return new SimpleAnnotationValue(ElementValue.PRIMITIVE_BOOLEAN, new Boolean(iConstant.booleanValue()));
      } else if (c instanceof StringConstant) {
        StringConstant sConstant = (StringConstant) c;
        return new SimpleAnnotationValue(ElementValue.STRING, sConstant.stringValue());
      }
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of org.aspectj.weaver.SimpleAnnotationValue

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.