private static void setFirstComponentPrimitiveValue(Varies v, String theValue) throws DataTypeException { Composite c = (Composite) v.getData(); Type firstComponent = c.getComponent(0); setFirstComponentPrimitiveValue(firstComponent, theValue); }
private static void setFirstComponentPrimitiveValue(Varies v, String theValue) throws DataTypeException { Composite c = (Composite) v.getData(); Type firstComponent = c.getComponent(0); setFirstComponentPrimitiveValue(firstComponent, theValue); }
private static void setFirstComponentPrimitiveValue(Type theFirstComponent, String theValue) throws DataTypeException { if (theFirstComponent instanceof Varies) { Varies firstComponentVaries = (Varies)theFirstComponent; if (((Varies) theFirstComponent).getData() instanceof Composite) { Type[] subComponents = ((Composite)firstComponentVaries.getData()).getComponents(); setFirstComponentPrimitiveValue(subComponents[0], theValue); for (int i = 1; i < subComponents.length; i++) { setFirstComponentPrimitiveValue(subComponents[i], ""); } } else { Primitive p = (Primitive) firstComponentVaries.getData(); p.setValue(theValue); } } else if (theFirstComponent instanceof Composite) { Type[] subComponents = ((Composite)theFirstComponent).getComponents(); setFirstComponentPrimitiveValue(subComponents[0], theValue); for (int i = 1; i < subComponents.length; i++) { setFirstComponentPrimitiveValue(subComponents[i], ""); } } else { ((Primitive)theFirstComponent).setValue(theValue); } }
private static void setFirstComponentPrimitiveValue(Type theFirstComponent, String theValue) throws DataTypeException { if (theFirstComponent instanceof Varies) { Varies firstComponentVaries = (Varies)theFirstComponent; if (((Varies) theFirstComponent).getData() instanceof Composite) { Type[] subComponents = ((Composite)firstComponentVaries.getData()).getComponents(); setFirstComponentPrimitiveValue(subComponents[0], theValue); for (int i = 1; i < subComponents.length; i++) { setFirstComponentPrimitiveValue(subComponents[i], ""); } } else { Primitive p = (Primitive) firstComponentVaries.getData(); p.setValue(theValue); } } else if (theFirstComponent instanceof Composite) { Type[] subComponents = ((Composite)theFirstComponent).getComponents(); setFirstComponentPrimitiveValue(subComponents[0], theValue); for (int i = 1; i < subComponents.length; i++) { setFirstComponentPrimitiveValue(subComponents[i], ""); } } else { ((Primitive)theFirstComponent).setValue(theValue); } }
setFirstComponentPrimitiveValue(v, firstComponentValue.toString());
setFirstComponentPrimitiveValue(v, firstComponentValue.toString());