public AnnotationValueBuilder addAnnotationArgument(TypeInfo type, bool runtimeVisible) { var result = new AnnotationValueBuilder(type, runtimeVisible); elements.add(result); return(result); }
public AnnotationValueBuilder setAnnotationArgument(String name, TypeInfo type, bool runtimeVisible) { var result = new AnnotationValueBuilder(type, runtimeVisible); arguments[name] = result; return(result); }
private AnnotationArgument buildAnnotationArrayElement(RawAnnotationArgument arg) { switch (arg.AnnotationArgumentKind) { case Boolean: case Byte: case Char: case Short: case Int: case Long: case Float: case Double: case String: return(new SimpleAnnotationArgument(arg.AnnotationArgumentKind, arg.Value)); case Enum: return(new EnumAnnotationArgument(getTypeInfo(arg.Type), arg.Name)); case Type: return(new TypeAnnotationArgument(getTypeInfo(arg.Type))); case Array: var ab = new AnnotationArrayValueBuilder(); foreach (var e in arg.Elements) { buildAnnotationArrayElement(ab, e); } return(ab); default: var vb = new AnnotationValueBuilder(getTypeInfo(arg.Type), arg.IsRuntimeVisible); buildAnnotationArgument(vb, arg); return(vb); } }
public AnnotationValueBuilder addAnnotation(TypeInfo type, bool runtimeVisible) { method.checkCreated(); var result = new AnnotationValueBuilder(type, runtimeVisible); annotations.add(result); return(result); }
private ArrayList <AnnotationValue> buildAnnotationValues(ArrayList <RawAnnotationValue> annotations) { var result = new ArrayList <AnnotationValue>(); foreach (var av in annotations) { var b = new AnnotationValueBuilder(getTypeInfo(av.Type), av.IsRuntimeVisible); buildAnnotationArgument(b, av); result.add(b); } return(result); }
public AnnotationValueBuilder addAnnotation(TypeInfo type, bool runtimeVisible) { checkCreated(); var result = new AnnotationValueBuilder(type, runtimeVisible); annotations.add(result); return result; }
private AnnotationArgument buildAnnotationArrayElement(RawAnnotationArgument arg) { switch (arg.AnnotationArgumentKind) { case Boolean: case Byte: case Char: case Short: case Int: case Long: case Float: case Double: case String: return new SimpleAnnotationArgument(arg.AnnotationArgumentKind, arg.Value); case Enum: return new EnumAnnotationArgument(getTypeInfo(arg.Type), arg.Name); case Type: return new TypeAnnotationArgument(getTypeInfo(arg.Type)); case Array: var ab = new AnnotationArrayValueBuilder(); foreach (var e in arg.Elements) { buildAnnotationArrayElement(ab, e); } return ab; default: var vb = new AnnotationValueBuilder(getTypeInfo(arg.Type), arg.IsRuntimeVisible); buildAnnotationArgument(vb, arg); return vb; } }
private void buildAnnotationArgument(AnnotationValueBuilder b, RawAnnotationArgument RawAnnotation) { foreach (var s in RawAnnotation.ArgumentNames) { var arg = RawAnnotation.getArgument(s); switch (arg.AnnotationArgumentKind) { case Boolean: b.setBooleanArgument(s, (Boolean)arg.Value); break; case Byte: b.setByteArgument(s, (Byte)arg.Value); break; case Char: b.setCharArgument(s, (Character)arg.Value); break; case Short: b.setShortArgument(s, (Short)arg.Value); break; case Int: b.setIntArgument(s, (Integer)arg.Value); break; case Long: b.setLongArgument(s, (Long)arg.Value); break; case Float: b.setFloatArgument(s, (Float)arg.Value); break; case Double: b.setDoubleArgument(s, (Double)arg.Value); break; case String: b.setStringArgument(s, (String)arg.Value); break; case Enum: b.setEnumArgument(s, getTypeInfo(arg.Type), arg.Name); break; case Type: b.setTypeArgument(s, getTypeInfo(arg.Type)); break; case Array: var ab = b.setArrayArgument(s); foreach (var e in arg.Elements) { buildAnnotationArrayElement(ab, e); } break; default: var vb = b.setAnnotationArgument(s, getTypeInfo(arg.Type), arg.IsRuntimeVisible); buildAnnotationArgument(vb, arg); break; } } }
private ArrayList<AnnotationValue> buildAnnotationValues(ArrayList<RawAnnotationValue> annotations) { var result = new ArrayList<AnnotationValue>(); foreach (var av in annotations) { var b = new AnnotationValueBuilder(getTypeInfo(av.Type), av.IsRuntimeVisible); buildAnnotationArgument(b, av); result.add(b); } return result; }
private static void cloneAnnotationValue(AnnotationValue value, Library targetTypeSystem, AnnotationValueBuilder builder, Scope<String, TypeInfo> genericArgs) { foreach (var s in value.ArgumentNames) { var a = value.getArgument(s); switch (a.AnnotationArgumentKind) { case Annotation: cloneAnnotationValue((AnnotationValue)a, targetTypeSystem, builder.setAnnotationArgument(s, a.Type, a.IsRuntimeVisible), genericArgs); break; case Array: var aab = builder.setArrayArgument(s); foreach (var aa in a.Elements) { cloneAnnotationArgument(aa, targetTypeSystem, aab, genericArgs); } break; case Boolean: builder.setBooleanArgument(s, (Boolean)a.Value); break; case Byte: builder.setByteArgument(s, (Byte)a.Value); break; case Char: builder.setCharArgument(s, (Character)a.Value); break; case Double: builder.setDoubleArgument(s, (Double)a.Value); break; case Enum: builder.setEnumArgument(s, a.getType(), a.Name); break; case Float: builder.setFloatArgument(s, (Float)a.Value); break; case Int: builder.setIntArgument(s, (Integer)a.Value); break; case Long: builder.setLongArgument(s, (Long)a.Value); break; case Short: builder.setShortArgument(s, (Short)a.Value); break; case String: builder.setStringArgument(s, (String)a.Value); break; case Type: builder.setTypeArgument(s, a.Type); break; } } }
public AnnotationValueBuilder setAnnotationArgument(String name, TypeInfo type, bool runtimeVisible) { var result = new AnnotationValueBuilder(type, runtimeVisible); arguments[name] = result; return result; }
public AnnotationValueBuilder addAnnotationArgument(TypeInfo type, bool runtimeVisible) { var result = new AnnotationValueBuilder(type, runtimeVisible); elements.add(result); return result; }