@Test(expected = IllegalArgumentException.class) public void testValidateWithUnknownClass() throws Exception { final LeafTransformSpec spec = new LeafTransformSpec("bad-class", "1 0 0 1 0 0"); spec.validate(); }
public void validate() throws IllegalArgumentException { if (! isFullyResolved()) { final Set<String> unresolvedIdList = new HashSet<>(); addUnresolvedIds(unresolvedIdList); throw new IllegalArgumentException("spec '" + id + "' has the following unresolved references: " + unresolvedIdList); } buildInstance(); }
TransformSpec implements Serializable { public void validate() throws IllegalArgumentException { if (! isFullyResolved()) { final Set<String> unresolvedIdList = new HashSet<>(); addUnresolvedIds(unresolvedIdList); throw new IllegalArgumentException("spec '" + id + "' has the following unresolved references: " + unresolvedIdList); } buildInstance(); } }
TransformSpec implements Serializable { public void validate() throws IllegalArgumentException { if (! isFullyResolved()) { final Set<String> unresolvedIdList = new HashSet<>(); addUnresolvedIds(unresolvedIdList); throw new IllegalArgumentException("spec '" + id + "' has the following unresolved references: " + unresolvedIdList); } buildInstance(); } protected  TransformSpec(final String id,
                            final TransformSpecMetaData metaData); }
TransformSpec implements Serializable { public void validate() throws IllegalArgumentException { if (! isFullyResolved()) { final Set<String> unresolvedIdList = new HashSet<>(); addUnresolvedIds(unresolvedIdList); throw new IllegalArgumentException("spec '" + id + "' has the following unresolved references: " + unresolvedIdList); } buildInstance(); } protected  TransformSpec(final String id,
                            final TransformSpecMetaData metaData); boolean hasId(); String getId(); TransformSpecMetaData getMetaData(); void setMetaData(final TransformSpecMetaData metaData); boolean hasLabel(final String label); boolean hasOneOfTheseLabels(final Set<String> labels); void addLabel(final String label); void removeLabel(final String label); void validate(); @JsonIgnore CoordinateTransform getNewInstance(); @JsonIgnore abstract boolean isFullyResolved(); abstract void addUnresolvedIds(Set<String> unresolvedIds); @JsonIgnore Set<String> getUnresolvedIds(); abstract void resolveReferences(Map<String, TransformSpec> idToSpecMap); abstract void flatten(ListTransformSpec flattenedList); String toJson(); static TransformSpec fromJson(final String json); static TransformSpec fromJson(final Reader json); static List<TransformSpec> fromJsonArray(final String json); static List<TransformSpec> fromJsonArray(final Reader json); static TransformSpec create(final CoordinateTransform transform); }
TransformSpec implements Serializable { public void validate() throws IllegalArgumentException { if (! isFullyResolved()) { final Set<String> unresolvedIdList = new HashSet<>(); addUnresolvedIds(unresolvedIdList); throw new IllegalArgumentException("spec '" + id + "' has the following unresolved references: " + unresolvedIdList); } buildInstance(); } protected  TransformSpec(final String id,
                            final TransformSpecMetaData metaData); boolean hasId(); String getId(); TransformSpecMetaData getMetaData(); void setMetaData(final TransformSpecMetaData metaData); boolean hasLabel(final String label); boolean hasOneOfTheseLabels(final Set<String> labels); void addLabel(final String label); void removeLabel(final String label); void validate(); @JsonIgnore CoordinateTransform getNewInstance(); @JsonIgnore abstract boolean isFullyResolved(); abstract void addUnresolvedIds(Set<String> unresolvedIds); @JsonIgnore Set<String> getUnresolvedIds(); abstract void resolveReferences(Map<String, TransformSpec> idToSpecMap); abstract void flatten(ListTransformSpec flattenedList); String toJson(); static TransformSpec fromJson(final String json); static TransformSpec fromJson(final Reader json); static List<TransformSpec> fromJsonArray(final String json); static List<TransformSpec> fromJsonArray(final Reader json); static TransformSpec create(final CoordinateTransform transform);  }