1 | try {↵ | | 1 | try {↵
|
2 | Object nestedElement = nc.create(project, parent, null);↵ | | 2 | nested↵
|
3 | if (project != null) {↵ | | |
|
4 | project.setProjectReference(nestedElement);↵ | | |
|
5 | }↵ | | |
|
6 | return nestedElement;↵ | | |
|
| | | 3 | Creator.store(parent, nestedObject);↵
|
| | | 4 | } catch (IllegalAccessException ex) {↵
|
| | | 5 | throw new BuildException(ex);↵
|
| | | 6 | } catch (InstantiationException ex) {↵
|
| | | 7 | throw new BuildException(ex);↵
|
7 | } catch (IllegalAccessException ie) {↵ | | 8 | } catch (IllegalArgumentException ex) {↵
|
8 | // impossible as getMethods should only return public methods↵ | | 9 | ↵
|
| | | 10 | if (polyType != null) {↵
|
9 | throw new BuildException(ie);↵ | | 11 | throw new BuildException(↵
|
|
10 | } catch (InstantiationException ine) {↵ | | 12 | ↵
|
11 | // impossible as getMethods should only return public methods↵ | | |
|
12 | throw new BuildException(ine);↵ | | |
|
| | | 13 | "Invalid type used " + polyType);↵
|
| | | 14 | }↵
|
| | | 15 | throw ex;↵
|
13 | } catch (InvocationTargetException ite) {↵ | | 16 | } catch (InvocationTargetException ex) {↵
|
14 | Throwable t = ite.getTargetException();↵ | | 17 | Throwable t = ex.getTargetException();↵
|
15 | if (t instanceof BuildException) {↵ | | 18 | if (t instanceof BuildException) {↵
|
16 | throw (BuildException) t;↵ | | 19 | throw (BuildException) t;↵
|
17 | }↵ | | 20 | }↵
|
18 | throw new BuildException(t);↵ | | 21 | throw new BuildException(t);↵
|
19 | | | 22 |
|