system/src/sc/lang/java/AnnotationValue.java
public static AnnotationValue create(String id, Object val) {
      AnnotationValue res = new AnnotationValue();
      res.identifier = id;
      // Currently in the grammar array values in annotations are stored in a List<ElementValue>
      if (val.getClass().isArray() || val instanceof List || val instanceof Set) {
         res.setProperty("elementValue", ArrayInitializer.createAnnotationValue(val));
      }
      else
         res.setProperty("elementValue", AbstractLiteral.createFromValue(val, true));
      return res;
   }
/**
    * To create an annotation value from a java.lang.String, java.lang.Boolean, etc. use this create method.
    * If you already have an Expression or Literal use createFromAnnotValue.
    */
To create an annotation value from a java.lang.String, java.lang.Boolean, etc. use this create method.
If you already have an Expression or Literal use createFromAnnotValue.
To create an annotation value from a java . lang . String java . lang . Boolean etc . use this create method . If you already have an Expression or Literal use createFromAnnotValue .
public static AnnotationValue create(String id, Object val) {
      AnnotationValue res = new AnnotationValue();
      res.identifier = id;
      if (val.getClass().isArray() || val instanceof List || val instanceof Set) {
         res.setProperty("elementValue", ArrayInitializer.createAnnotationValue(val));
      }
      else
         res.setProperty("elementValue", AbstractLiteral.createFromValue(val, true));
      return res;
   }
public static AnnotationValue create ( String id , Object val ) { AnnotationValue res = new AnnotationValue ( ) ; res . identifier = id ; if ( val . getClass ( ) . isArray ( ) || val instanceof List || val instanceof Set ) { res . setProperty ( "elementValue" , ArrayInitializer . createAnnotationValue ( val ) ) ; } else res . setProperty ( "elementValue" , AbstractLiteral . createFromValue ( val , true ) ) ; return res ; }
To create an annotation value from a java.lang.String, java.lang.Boolean, etc.
To create an annotation value from a java . lang . String java . lang . Boolean etc .
// Currently in the grammar array values in annotations are stored in a List<ElementValue>