public static UndefinedDataType getInstance() { if (instance == null) { instance = new UndefinedDataType(); } return instance; }
public DataType getType() { return new StringDataType(); } public void setType(DataType type) {
public Map<String, Object> getValueMap() { return getValueMap( null ); }
protected DataType getDataType(String itemSubjectRef, Map<String, ItemDefinition> itemDefinitions, ClassLoader cl) { DataType dataType = new ObjectDataType(); if (itemDefinitions == null) { return dataType; } ItemDefinition itemDefinition = itemDefinitions.get(itemSubjectRef); if (itemDefinition != null) { String structureRef = itemDefinition.getStructureRef(); if ("java.lang.Boolean".equals(structureRef) || "Boolean".equals(structureRef)) { dataType = new BooleanDataType(); } else if ("java.lang.Integer".equals(structureRef) || "Integer".equals(structureRef)) { dataType = new IntegerDataType(); } else if ("java.lang.Float".equals(structureRef) || "Float".equals(structureRef)) { dataType = new FloatDataType(); } else if ("java.lang.String".equals(structureRef) || "String".equals(structureRef)) { dataType = new StringDataType(); } else if ("java.lang.Object".equals(structureRef) || "Object".equals(structureRef)) { dataType = new ObjectDataType(structureRef); } else { dataType = new ObjectDataType(structureRef, cl); } } return dataType; }
public ObjectDataType(String className, ClassLoader classLoader) { setClassName(className); setClassLoader(classLoader); }
public ObjectDataType(String className) { setClassName(className); }
public Variable() { this.type = UndefinedDataType.getInstance(); }
public ListDataType(DataType dataType) { setType(dataType); }
public Object readValue(String value) { return getXStream().fromXML(value); }
public EnumDataType(String className) { setClassName(className); }
public String[] getValueNames() { return getValueNames(null); }
public Object[] getValues() { return getValues(null); }
public ListDataType() { setClassName("java.util.List"); }
if (UndefinedDataType.getInstance().equals(variable.getType()) && itemDefinitions != null && itemSubjectRef != null) { DataType dataType = new ObjectDataType(); ItemDefinition itemDefinition = itemDefinitions.get(itemSubjectRef); if (itemDefinition != null) { dataType = new BooleanDataType(); dataType = new IntegerDataType(); dataType = new FloatDataType(); dataType = new StringDataType(); dataType = new ObjectDataType("java.lang.Object"); dataType = new ObjectDataType(structureRef, cl);
public DataType getType() { return new StringDataType(); } public void setType(DataType type) {
public boolean verifyDataType(final Object value) { if (value == null) { return true; } return getValueMap(null).containsValue(value); }
public String writeValue(Object value) { return getXStream().toXML(value); }
public Object readValue(String value) { return getValueMap(null).get(value); }
public Object[] getValues(ClassLoader classLoader) { return getValueMap(classLoader).values().toArray(); }
public String[] getValueNames(ClassLoader classLoader) { return getValueMap(classLoader).keySet().toArray(new String[0]); }