public AnnotationArrayValueBuilder setArrayArgument(String name) { var result = new AnnotationArrayValueBuilder(); arguments[name] = result; return(result); }
public AnnotationArrayValueBuilder addArrayArgument() { var result = new AnnotationArrayValueBuilder(); elements.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 buildAnnotationArrayElement(AnnotationArrayValueBuilder b, RawAnnotationArgument arg) { switch (arg.AnnotationArgumentKind) { case Boolean: b.addBooleanArgument((Boolean)arg.Value); break; case Byte: b.addByteArgument((Byte)arg.Value); break; case Char: b.addCharArgument((Character)arg.Value); break; case Short: b.addShortArgument((Short)arg.Value); break; case Int: b.addIntArgument((Integer)arg.Value); break; case Long: b.addLongArgument((Long)arg.Value); break; case Float: b.addFloatArgument((Float)arg.Value); break; case Double: b.addDoubleArgument((Double)arg.Value); break; case String: b.addStringArgument((String)arg.Value); break; case Enum: b.addEnumArgument(getTypeInfo(arg.Type), arg.Name); break; case Type: b.addTypeArgument(getTypeInfo(arg.Type)); break; case Array: var ab = b.addArrayArgument(); foreach (var e in arg.Elements) { buildAnnotationArrayElement(ab, e); } break; default: var vb = b.addAnnotationArgument(getTypeInfo(arg.Type), arg.IsRuntimeVisible); buildAnnotationArgument(vb, arg); break; } }
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 static void cloneAnnotationArgument(AnnotationArgument arg, Library targetTypeSystem, AnnotationArrayValueBuilder builder, Scope<String, TypeInfo> genericArgs) { switch (arg.AnnotationArgumentKind) { case Annotation: cloneAnnotationValue((AnnotationValue)arg, targetTypeSystem, builder.addAnnotationArgument(arg.Type, arg.IsRuntimeVisible), genericArgs); break; case Array: var avb = builder.addArrayArgument(); foreach (var aa in arg.Elements) { cloneAnnotationArgument(aa, targetTypeSystem, avb, genericArgs); } break; case Boolean: builder.addBooleanArgument((Boolean)arg.Value); break; case Byte: builder.addByteArgument((Byte)arg.Value); break; case Char: builder.addCharArgument((Character)arg.Value); break; case Double: builder.addDoubleArgument((Double)arg.Value); break; case Enum: builder.addEnumArgument(arg.Type, arg.Name); break; case Float: builder.addFloatArgument((Float)arg.Value); break; case Int: builder.addIntArgument((Integer)arg.Value); break; case Long: builder.addLongArgument((Long)arg.Value); break; case Short: builder.addShortArgument((Short)arg.Value); break; case String: builder.addStringArgument((String)arg.Value); break; case Type: builder.addTypeArgument(arg.Type); break; } }
public AnnotationArrayValueBuilder setArrayArgument(String name) { var result = new AnnotationArrayValueBuilder(); arguments[name] = result; return result; }
public AnnotationArrayValueBuilder addArrayArgument() { var result = new AnnotationArrayValueBuilder(); elements.add(result); return result; }