private MutableTypeValue[] toTypeValues(MutableTypeMirror componentType, Object... values) { MutableTypeValue[] arrayValues = new MutableTypeValue[values.length]; int i = 0; for (Object value: values) { arrayValues[i++] = getTypeValue(componentType, value); } return arrayValues; }
public MutableTypeValue getAnnotationTypeValue(Object value) { if (value.getClass().isArray()) { return getAnnotationArrayValue(getArrayType(toMutableType(value.getClass().getComponentType())), (Object[])value); } return getTypeValue(value); }
public MutableTypeValue getTypeValue(Object value) { if (value.getClass().isArray()) { return getArrayValue(getArrayType(toMutableType(value.getClass().getComponentType())), (Object[])value); } if (value.getClass().isEnum()) { return getEnumValue(value); } return getTypeValue(toMutableType(value.getClass()), value); }
public MutableAnnotationMirror setAnnotationValue(String methodName, Object value) { return mutableAnnotation.setAnnotationValue(methodName, processingEnv.getTypeUtils().getTypeValue(value)); }
public MutableAnnotationMirror toMutableAnnotation(Class<?> clazz, String name, Object value) { MutableAnnotation mutableAnnotation = new MutableAnnotation(toMutableType(clazz), processingEnv); mutableAnnotation.setAnnotationValue(name, processingEnv.getTypeUtils().getTypeValue(value)); return mutableAnnotation; }
result += processingEnv.getTypeUtils().getTypeValue(method.invoke(value)).toString(serializer, typed); i++; } catch (Exception e) {}
MutableTypeValue typeValue = processingEnv.getTypeUtils().getTypeValue(method.invoke(value.getValue())); if (typeValue instanceof MutableArrayTypeValue) { types.add((MutableDeclaredType) ((MutableArrayTypeValue) typeValue).asType().getComponentType());