private ReferenceDataType(StructuredDataType targetType, int id) { super(buildTypeName(targetType), id); this.targetType = targetType; }
private ReferenceDataType(StructuredDataType targetType) { this(targetType, buildTypeName(targetType).hashCode()); }
/** * Overrides the stored temporary data type with a concrete StructuredDataType instance. Should only * be invoked from configuration or model code when resolving temporary types. * * @throws IllegalStateException if the previously stored target type is already a concrete * instance (not TemporaryStructuredDataType). */ public void setTargetType(StructuredDataType targetType) { if (! (this.targetType instanceof TemporaryStructuredDataType)) { throw new IllegalStateException(String.format( "Unexpected attempt to replace already concrete target " + "type in ReferenceDataType instance (type is '%s')", this.targetType.getName())); } this.targetType = targetType; setName(buildTypeName(targetType)); }