xy.reflect.ui.info.field.ValueOptionsAsEnumerationFieldInfo Maven / Gradle / Ivy
package xy.reflect.ui.info.field;
import java.util.Arrays;
import java.util.Iterator;
import xy.reflect.ui.ReflectionUI;
import xy.reflect.ui.info.type.ITypeInfo;
import xy.reflect.ui.info.type.factory.GenericEnumerationFactory;
public class ValueOptionsAsEnumerationFieldInfo extends FieldInfoProxy {
protected Object object;
protected GenericEnumerationFactory enumFactory;
protected ITypeInfo enumType;
private ReflectionUI reflectionUI;
public ValueOptionsAsEnumerationFieldInfo(ReflectionUI reflectionUI, Object object, IFieldInfo base) {
super(base);
this.reflectionUI = reflectionUI;
this.object = object;
this.enumFactory = createArrayAsEnumerationFactory();
this.enumType = reflectionUI.getTypeInfo(enumFactory.getInstanceTypeInfoSource());
}
protected GenericEnumerationFactory createArrayAsEnumerationFactory() {
ITypeInfo ownerType = reflectionUI.getTypeInfo(reflectionUI.getTypeInfoSource(object));
String enumTypeName = "ValueOptions [ownerType=" + ownerType.getName() + ", field=" + base.getName() + "]";
Iterable