-\r
- @SuppressWarnings("unchecked")\r
- @Override\r
- public <T extends Datatype> T getChildType(ChildReference reference) throws ReferenceException {\r
- if (reference==null) return (T) this;\r
- \r
- if (reference instanceof LabelReference) {\r
- LabelReference lr = (LabelReference) reference;\r
- try {\r
- Integer.valueOf( lr.label );\r
- return componentType.getChildType(reference.getChildReference());\r
- } catch ( NumberFormatException nfe ) {\r
- throw new ReferenceException(nfe);\r
- } \r
- } else if (reference instanceof IndexReference) {\r
- return componentType.getChildType(reference.getChildReference());\r
- } \r
- throw new ReferenceException(reference.getClass().getName()+" is not a reference of an array"); \r
- }\r
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public <T extends Datatype> T getChildType(ChildReference reference) throws ReferenceException {
+ if (reference==null) return (T) this;
+
+ if (reference instanceof LabelReference) {
+ LabelReference lr = (LabelReference) reference;
+ try {
+ Integer.valueOf( lr.label );
+ return componentType.getChildType(reference.getChildReference());
+ } catch ( NumberFormatException nfe ) {
+ throw new ReferenceException(nfe);
+ }
+ } else if (reference instanceof IndexReference) {
+ return componentType.getChildType(reference.getChildReference());
+ }
+ throw new ReferenceException(reference.getClass().getName()+" is not a reference of an array");
+ }