Revision 212 org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/dynobject/impl/DefaultDynField.java

View differences:

DefaultDynField.java
43 43
	private DynField elementsType;
44 44
	private boolean validateElements;
45 45
	private boolean isReadOnly;
46
	private Class theClassOfItems=null;
46 47

  
47 48
	public void check() throws ListBaseException {
48 49
		ListBaseException exceptions = null;
......
305 306

  
306 307
	public DynField setClassOfValue(Class theClass)
307 308
			throws DynFieldIsNotAContainerException {
308
		switch (this.dataType) {
309
		case DataTypes.OBJECT:
310
		case DataTypes.ARRAY:
311
		case DataTypes.LIST:
312
		case DataTypes.MAP:
313
		case DataTypes.SET:
314
			break;
315
		default:
316
			throw new DynFieldIsNotAContainerException(this.name);
317
		}
318 309
		this.theClass = theClass;
319 310
		return this;
320 311
	}
......
539 530
	    return this;
540 531
	}
541 532

  
533
	public Class getClassOfItems() {
534
		return this.theClassOfItems;
535
	}
542 536

  
537
	public DynField setDefaultValue(Object defaultValue) {
538
		this.defaultValue = defaultValue;
539
		return this;
540
	}
541

  
542
	public DynField setClassOfItems(Class theClass)
543
			throws DynFieldIsNotAContainerException {
544
		switch (this.dataType) {
545
		case DataTypes.ARRAY:
546
		case DataTypes.LIST:
547
		case DataTypes.MAP:
548
		case DataTypes.SET:
549
			break;
550
		default:
551
			throw new DynFieldIsNotAContainerException(this.name);
552
		}
553
		this.theClassOfItems = theClass;
554
		return this;
555
	}
556

  
557

  
543 558
}

Also available in: Unified diff