The following document contains the results of PMD's CPD 5.2.3.
| File | Line |
|---|---|
| org/jomc/tools/model/SourceFileType.java | 512 |
| org/jomc/tools/model/SourceSectionType.java | 483 |
throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'Any' of class 'org.jomc.tools.model.SourceFileType'."));
}
}
}
/**
* Creates and returns a deep copy of a given object.
*
* @param o
* The instance to copy or {@code null}.
* @return
* A deep copy of {@code o} or {@code null} if {@code o} is {@code null}.
*/
@SuppressWarnings("unchecked")
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
private static Object copyOf(final Object o) {
// CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
try {
if (o!= null) {
if (o.getClass().isPrimitive()) {
return o;
}
if (o.getClass().isArray()) {
return copyOfArray(o);
}
// Immutable types.
if (o instanceof Boolean) {
return o;
}
if (o instanceof Byte) {
return o;
}
if (o instanceof Character) {
return o;
}
if (o instanceof Double) {
return o;
}
if (o instanceof Enum) {
return o;
}
if (o instanceof Float) {
return o;
}
if (o instanceof Integer) {
return o;
}
if (o instanceof Long) {
return o;
}
if (o instanceof Short) {
return o;
}
if (o instanceof String) {
return o;
}
if (o instanceof BigDecimal) {
return o;
}
if (o instanceof BigInteger) {
return o;
}
if (o instanceof UUID) {
return o;
}
if (o instanceof QName) {
return o;
}
if (o instanceof Duration) {
return o;
}
if (o instanceof Currency) {
return o;
}
// String based types.
if (o instanceof File) {
return new File(o.toString());
}
if (o instanceof URI) {
return new URI(o.toString());
}
if (o instanceof URL) {
return new URL(o.toString());
}
if (o instanceof MimeType) {
return new MimeType(o.toString());
}
// Cloneable types.
if (o instanceof XMLGregorianCalendar) {
return ((XMLGregorianCalendar) o).clone();
}
if (o instanceof Date) {
return ((Date) o).clone();
}
if (o instanceof Calendar) {
return ((Calendar) o).clone();
}
if (o instanceof TimeZone) {
return ((TimeZone) o).clone();
}
if (o instanceof Locale) {
return ((Locale) o).clone();
}
if (o instanceof Element) {
return ((Element)((Element) o).cloneNode(true));
}
if (o instanceof JAXBElement) {
return copyOf(((JAXBElement) o));
}
try {
return o.getClass().getMethod("clone", ((Class[]) null)).invoke(o, ((Object[]) null));
} catch (NoSuchMethodException e) {
if (o instanceof Serializable) {
return copyOf(((Serializable) o));
}
// Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
} catch (IllegalAccessException e) {
// Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
} catch (InvocationTargetException e) {
// Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
} catch (SecurityException e) {
// Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
} catch (IllegalArgumentException e) {
// Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
} catch (ExceptionInInitializerError e) {
// Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
}
}
return null;
} catch (MimeTypeParseException e) {
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
} catch (MalformedURLException e) {
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
} catch (URISyntaxException e) {
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
}
}
/**
* Creates and returns a deep copy of a given array.
*
* @param array
* The array to copy or {@code null}.
* @return
* A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
private static Object copyOfArray(final Object array) {
// CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
if (array!= null) {
if (array.getClass() == boolean[].class) {
return copyOf(((boolean[]) array));
}
if (array.getClass() == byte[].class) {
return copyOf(((byte[]) array));
}
if (array.getClass() == char[].class) {
return copyOf(((char[]) array));
}
if (array.getClass() == double[].class) {
return copyOf(((double[]) array));
}
if (array.getClass() == float[].class) {
return copyOf(((float[]) array));
}
if (array.getClass() == int[].class) {
return copyOf(((int[]) array));
}
if (array.getClass() == long[].class) {
return copyOf(((long[]) array));
}
if (array.getClass() == short[].class) {
return copyOf(((short[]) array));
}
final int len = Array.getLength(array);
final Object copy = Array.newInstance(array.getClass().getComponentType(), len);
for (int i = (len- 1); (i >= 0); i--) {
Array.set(copy, i, copyOf(Array.get(array, i)));
}
return copy;
}
return null;
}
/**
* Creates and returns a deep copy of a given array.
*
* @param array
* The array to copy or {@code null}.
* @return
* A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
private static boolean[] copyOf(final boolean[] array) {
// CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
if (array!= null) {
final boolean[] copy = ((boolean[]) Array.newInstance(array.getClass().getComponentType(), array.length));
System.arraycopy(array, 0, copy, 0, array.length);
return copy;
}
return null;
}
/**
* Creates and returns a deep copy of a given array.
*
* @param array
* The array to copy or {@code null}.
* @return
* A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
private static byte[] copyOf(final byte[] array) {
// CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
if (array!= null) {
final byte[] copy = ((byte[]) Array.newInstance(array.getClass().getComponentType(), array.length));
System.arraycopy(array, 0, copy, 0, array.length);
return copy;
}
return null;
}
/**
* Creates and returns a deep copy of a given array.
*
* @param array
* The array to copy or {@code null}.
* @return
* A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
private static char[] copyOf(final char[] array) {
// CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
if (array!= null) {
final char[] copy = ((char[]) Array.newInstance(array.getClass().getComponentType(), array.length));
System.arraycopy(array, 0, copy, 0, array.length);
return copy;
}
return null;
}
/**
* Creates and returns a deep copy of a given array.
*
* @param array
* The array to copy or {@code null}.
* @return
* A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
private static double[] copyOf(final double[] array) {
// CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
if (array!= null) {
final double[] copy = ((double[]) Array.newInstance(array.getClass().getComponentType(), array.length));
System.arraycopy(array, 0, copy, 0, array.length);
return copy;
}
return null;
}
/**
* Creates and returns a deep copy of a given array.
*
* @param array
* The array to copy or {@code null}.
* @return
* A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
private static float[] copyOf(final float[] array) {
// CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
if (array!= null) {
final float[] copy = ((float[]) Array.newInstance(array.getClass().getComponentType(), array.length));
System.arraycopy(array, 0, copy, 0, array.length);
return copy;
}
return null;
}
/**
* Creates and returns a deep copy of a given array.
*
* @param array
* The array to copy or {@code null}.
* @return
* A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
private static int[] copyOf(final int[] array) {
// CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
if (array!= null) {
final int[] copy = ((int[]) Array.newInstance(array.getClass().getComponentType(), array.length));
System.arraycopy(array, 0, copy, 0, array.length);
return copy;
}
return null;
}
/**
* Creates and returns a deep copy of a given array.
*
* @param array
* The array to copy or {@code null}.
* @return
* A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
private static long[] copyOf(final long[] array) {
// CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
if (array!= null) {
final long[] copy = ((long[]) Array.newInstance(array.getClass().getComponentType(), array.length));
System.arraycopy(array, 0, copy, 0, array.length);
return copy;
}
return null;
}
/**
* Creates and returns a deep copy of a given array.
*
* @param array
* The array to copy or {@code null}.
* @return
* A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
private static short[] copyOf(final short[] array) {
// CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
if (array!= null) {
final short[] copy = ((short[]) Array.newInstance(array.getClass().getComponentType(), array.length));
System.arraycopy(array, 0, copy, 0, array.length);
return copy;
}
return null;
}
/**
* Creates and returns a deep copy of a given {@code JAXBElement} instance.
*
* @param element
* The instance to copy or {@code null}.
* @return
* A deep copy of {@code element} or {@code null} if {@code element} is {@code null}.
*/
@SuppressWarnings("unchecked")
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
private static JAXBElement copyOf(final JAXBElement element) {
// CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
if (element!= null) {
final JAXBElement copy = new JAXBElement(element.getName(), element.getDeclaredType(), element.getScope(), element.getValue());
copy.setNil(element.isNil());
copy.setValue(copyOf(copy.getValue()));
return copy;
}
return null;
}
/**
* Creates and returns a deep copy of a given {@code Serializable}.
*
* @param serializable
* The instance to copy or {@code null}.
* @return
* A deep copy of {@code serializable} or {@code null} if {@code serializable} is {@code null}.
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
private static Serializable copyOf(final Serializable serializable) {
// CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
if (serializable!= null) {
try {
final ByteArrayOutputStream byteArrayOutput = new ByteArrayOutputStream();
final ObjectOutputStream out = new ObjectOutputStream(byteArrayOutput);
out.writeObject(serializable);
out.close();
final ByteArrayInputStream byteArrayInput = new ByteArrayInputStream(byteArrayOutput.toByteArray());
final ObjectInputStream in = new ObjectInputStream(byteArrayInput);
final Serializable copy = ((Serializable) in.readObject());
in.close();
return copy;
} catch (SecurityException e) {
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
} catch (ClassNotFoundException e) {
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
} catch (InvalidClassException e) {
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
} catch (NotSerializableException e) {
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
} catch (StreamCorruptedException e) {
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
} catch (OptionalDataException e) {
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
} catch (IOException e) {
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
}
}
return null;
}
/**
* Creates and returns a deep copy of this object.
*
*
* @return
* A deep copy of this object.
*/
@Override
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
public SourceFileType clone() { | |
| File | Line |
|---|---|
| org/jomc/tools/model/SourceFileType.java | 515 |
| org/jomc/tools/model/SourceSectionType.java | 486 |
| org/jomc/tools/model/TemplateParameterType.java | 270 |
}
/**
* Creates and returns a deep copy of a given object.
*
* @param o
* The instance to copy or {@code null}.
* @return
* A deep copy of {@code o} or {@code null} if {@code o} is {@code null}.
*/
@SuppressWarnings("unchecked")
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
private static Object copyOf(final Object o) {
// CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
try {
if (o!= null) {
if (o.getClass().isPrimitive()) {
return o;
}
if (o.getClass().isArray()) {
return copyOfArray(o);
}
// Immutable types.
if (o instanceof Boolean) {
return o;
}
if (o instanceof Byte) {
return o;
}
if (o instanceof Character) {
return o;
}
if (o instanceof Double) {
return o;
}
if (o instanceof Enum) {
return o;
}
if (o instanceof Float) {
return o;
}
if (o instanceof Integer) {
return o;
}
if (o instanceof Long) {
return o;
}
if (o instanceof Short) {
return o;
}
if (o instanceof String) {
return o;
}
if (o instanceof BigDecimal) {
return o;
}
if (o instanceof BigInteger) {
return o;
}
if (o instanceof UUID) {
return o;
}
if (o instanceof QName) {
return o;
}
if (o instanceof Duration) {
return o;
}
if (o instanceof Currency) {
return o;
}
// String based types.
if (o instanceof File) {
return new File(o.toString());
}
if (o instanceof URI) {
return new URI(o.toString());
}
if (o instanceof URL) {
return new URL(o.toString());
}
if (o instanceof MimeType) {
return new MimeType(o.toString());
}
// Cloneable types.
if (o instanceof XMLGregorianCalendar) {
return ((XMLGregorianCalendar) o).clone();
}
if (o instanceof Date) {
return ((Date) o).clone();
}
if (o instanceof Calendar) {
return ((Calendar) o).clone();
}
if (o instanceof TimeZone) {
return ((TimeZone) o).clone();
}
if (o instanceof Locale) {
return ((Locale) o).clone();
}
if (o instanceof Element) {
return ((Element)((Element) o).cloneNode(true));
}
if (o instanceof JAXBElement) {
return copyOf(((JAXBElement) o));
}
try {
return o.getClass().getMethod("clone", ((Class[]) null)).invoke(o, ((Object[]) null));
} catch (NoSuchMethodException e) {
if (o instanceof Serializable) {
return copyOf(((Serializable) o));
}
// Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
} catch (IllegalAccessException e) {
// Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
} catch (InvocationTargetException e) {
// Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
} catch (SecurityException e) {
// Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
} catch (IllegalArgumentException e) {
// Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
} catch (ExceptionInInitializerError e) {
// Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
}
}
return null;
} catch (MimeTypeParseException e) {
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
} catch (MalformedURLException e) {
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
} catch (URISyntaxException e) {
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
}
}
/**
* Creates and returns a deep copy of a given array.
*
* @param array
* The array to copy or {@code null}.
* @return
* A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
private static Object copyOfArray(final Object array) {
// CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
if (array!= null) {
if (array.getClass() == boolean[].class) {
return copyOf(((boolean[]) array));
}
if (array.getClass() == byte[].class) {
return copyOf(((byte[]) array));
}
if (array.getClass() == char[].class) {
return copyOf(((char[]) array));
}
if (array.getClass() == double[].class) {
return copyOf(((double[]) array));
}
if (array.getClass() == float[].class) {
return copyOf(((float[]) array));
}
if (array.getClass() == int[].class) {
return copyOf(((int[]) array));
}
if (array.getClass() == long[].class) {
return copyOf(((long[]) array));
}
if (array.getClass() == short[].class) {
return copyOf(((short[]) array));
}
final int len = Array.getLength(array);
final Object copy = Array.newInstance(array.getClass().getComponentType(), len);
for (int i = (len- 1); (i >= 0); i--) {
Array.set(copy, i, copyOf(Array.get(array, i)));
}
return copy;
}
return null;
}
/**
* Creates and returns a deep copy of a given array.
*
* @param array
* The array to copy or {@code null}.
* @return
* A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
private static boolean[] copyOf(final boolean[] array) {
// CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
if (array!= null) {
final boolean[] copy = ((boolean[]) Array.newInstance(array.getClass().getComponentType(), array.length));
System.arraycopy(array, 0, copy, 0, array.length);
return copy;
}
return null;
}
/**
* Creates and returns a deep copy of a given array.
*
* @param array
* The array to copy or {@code null}.
* @return
* A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
private static byte[] copyOf(final byte[] array) {
// CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
if (array!= null) {
final byte[] copy = ((byte[]) Array.newInstance(array.getClass().getComponentType(), array.length));
System.arraycopy(array, 0, copy, 0, array.length);
return copy;
}
return null;
}
/**
* Creates and returns a deep copy of a given array.
*
* @param array
* The array to copy or {@code null}.
* @return
* A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
private static char[] copyOf(final char[] array) {
// CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
if (array!= null) {
final char[] copy = ((char[]) Array.newInstance(array.getClass().getComponentType(), array.length));
System.arraycopy(array, 0, copy, 0, array.length);
return copy;
}
return null;
}
/**
* Creates and returns a deep copy of a given array.
*
* @param array
* The array to copy or {@code null}.
* @return
* A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
private static double[] copyOf(final double[] array) {
// CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
if (array!= null) {
final double[] copy = ((double[]) Array.newInstance(array.getClass().getComponentType(), array.length));
System.arraycopy(array, 0, copy, 0, array.length);
return copy;
}
return null;
}
/**
* Creates and returns a deep copy of a given array.
*
* @param array
* The array to copy or {@code null}.
* @return
* A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
private static float[] copyOf(final float[] array) {
// CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
if (array!= null) {
final float[] copy = ((float[]) Array.newInstance(array.getClass().getComponentType(), array.length));
System.arraycopy(array, 0, copy, 0, array.length);
return copy;
}
return null;
}
/**
* Creates and returns a deep copy of a given array.
*
* @param array
* The array to copy or {@code null}.
* @return
* A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
private static int[] copyOf(final int[] array) {
// CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
if (array!= null) {
final int[] copy = ((int[]) Array.newInstance(array.getClass().getComponentType(), array.length));
System.arraycopy(array, 0, copy, 0, array.length);
return copy;
}
return null;
}
/**
* Creates and returns a deep copy of a given array.
*
* @param array
* The array to copy or {@code null}.
* @return
* A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
private static long[] copyOf(final long[] array) {
// CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
if (array!= null) {
final long[] copy = ((long[]) Array.newInstance(array.getClass().getComponentType(), array.length));
System.arraycopy(array, 0, copy, 0, array.length);
return copy;
}
return null;
}
/**
* Creates and returns a deep copy of a given array.
*
* @param array
* The array to copy or {@code null}.
* @return
* A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
private static short[] copyOf(final short[] array) {
// CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
if (array!= null) {
final short[] copy = ((short[]) Array.newInstance(array.getClass().getComponentType(), array.length));
System.arraycopy(array, 0, copy, 0, array.length);
return copy;
}
return null;
}
/**
* Creates and returns a deep copy of a given {@code JAXBElement} instance.
*
* @param element
* The instance to copy or {@code null}.
* @return
* A deep copy of {@code element} or {@code null} if {@code element} is {@code null}.
*/
@SuppressWarnings("unchecked")
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
private static JAXBElement copyOf(final JAXBElement element) {
// CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
if (element!= null) {
final JAXBElement copy = new JAXBElement(element.getName(), element.getDeclaredType(), element.getScope(), element.getValue());
copy.setNil(element.isNil());
copy.setValue(copyOf(copy.getValue()));
return copy;
}
return null;
}
/**
* Creates and returns a deep copy of a given {@code Serializable}.
*
* @param serializable
* The instance to copy or {@code null}.
* @return
* A deep copy of {@code serializable} or {@code null} if {@code serializable} is {@code null}.
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
private static Serializable copyOf(final Serializable serializable) {
// CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
if (serializable!= null) {
try {
final ByteArrayOutputStream byteArrayOutput = new ByteArrayOutputStream();
final ObjectOutputStream out = new ObjectOutputStream(byteArrayOutput);
out.writeObject(serializable);
out.close();
final ByteArrayInputStream byteArrayInput = new ByteArrayInputStream(byteArrayOutput.toByteArray());
final ObjectInputStream in = new ObjectInputStream(byteArrayInput);
final Serializable copy = ((Serializable) in.readObject());
in.close();
return copy;
} catch (SecurityException e) {
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
} catch (ClassNotFoundException e) {
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
} catch (InvalidClassException e) {
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
} catch (NotSerializableException e) {
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
} catch (StreamCorruptedException e) {
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
} catch (OptionalDataException e) {
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
} catch (IOException e) {
throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
}
}
return null;
}
/**
* Creates and returns a deep copy of this object.
*
*
* @return
* A deep copy of this object.
*/
@Override
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
public SourceFileType clone() { | |
| File | Line |
|---|---|
| org/jomc/tools/modlet/ToolsModelProcessor.java | 668 |
| org/jomc/tools/modlet/ToolsModelProvider.java | 737 |
}
/**
* Gets the default source code file location for a given specification.
* <p>
* If the specification provides a Java type name, this method returns a Java source code file location based on
* that Java type name.
* </p>
*
* @param context The context to get the default location with.
* @param modules The model to get the default location with.
* @param specification The specification to get the default location for.
*
* @return The default location for {@code specification} or {@code null}.
*
* @throws NullPointerException if {@code context}, {@code modules} or {@code specification} is {@code null}.
*
* @see SourceFileType#getLocation()
* @see Specification#getJavaTypeName()
* @since 1.6
*/
protected String getDefaultSourceFileLocation( final ModelContext context, final Modules modules,
final Specification specification )
{
if ( context == null )
{
throw new NullPointerException( "context" );
}
if ( modules == null )
{
throw new NullPointerException( "modules" );
}
if ( specification == null )
{
throw new NullPointerException( "specification" );
}
String location = null;
try
{
if ( specification.getJavaTypeName() != null )
{
location = specification.getJavaTypeName().getQualifiedName().replace( '.', '/' ) + ".java";
}
}
catch ( final ModelObjectException e )
{
context.log( Level.WARNING, getMessage( e ), null );
}
return location;
}
/**
* Gets the default source code file location for a given implementation.
* <p>
* If the implementation provides a Java type name, this method returns a Java source code file location based on
* that Java type name.
* </p>
*
* @param context The context to get the default location with.
* @param modules The model to get the default location with.
* @param implementation The implementation to get the default location for.
*
* @return The default location for {@code implementation} or {@code null}.
*
* @throws NullPointerException if {@code context}, {@code modules} or {@code implementation} is {@code null}.
*
* @see SourceFileType#getLocation()
* @see Implementation#getJavaTypeName()
* @since 1.6
*/
protected String getDefaultSourceFileLocation( final ModelContext context, final Modules modules,
final Implementation implementation )
{
if ( context == null )
{
throw new NullPointerException( "context" );
}
if ( modules == null )
{
throw new NullPointerException( "modules" );
}
if ( implementation == null )
{
throw new NullPointerException( "implementation" );
}
String location = null;
try
{
if ( implementation.getJavaTypeName() != null )
{
location = implementation.getJavaTypeName().getQualifiedName().replace( '.', '/' ) + ".java";
}
}
catch ( final ModelObjectException e )
{
context.log( Level.WARNING, getMessage( e ), null );
}
return location;
}
/**
* Gets the default source section name for a given specification.
* <p>
* If the specification provides a Java type name, this method returns a section name based on that Java type
* name.
* </p>
*
* @param context The context to get the default section name with.
* @param modules The model to get the default section name with.
* @param specification The specification to get the default section name for.
*
* @return The default source section name for {@code specification} or {@code null}.
*
* @throws NullPointerException if {@code context}, {@code modules} or {@code specification} is {@code null}.
*
* @see SourceSectionType#getName()
* @see Specification#getJavaTypeName()
* @since 1.6
*/
protected String getDefaultSourceSectionName( final ModelContext context, final Modules modules,
final Specification specification )
{
if ( context == null )
{
throw new NullPointerException( "context" );
}
if ( modules == null )
{
throw new NullPointerException( "modules" );
}
if ( specification == null )
{
throw new NullPointerException( "specification" );
}
String sectionName = null;
try
{
final JavaTypeName javaTypeName = specification.getJavaTypeName();
if ( javaTypeName != null )
{
sectionName = javaTypeName.getName( false );
}
}
catch ( final ModelObjectException e )
{
context.log( Level.WARNING, getMessage( e ), null );
}
return sectionName;
}
/**
* Gets the default source section name for a given implementation.
* <p>
* If the implementation provides a Java type name, this method returns a section name based that Java type
* name.
* </p>
*
* @param context The context to get the default section name with.
* @param modules The model to get the default section name with.
* @param implementation The implementation to get the default section name for.
*
* @return The default source section name for {@code implementation} or {@code null}.
*
* @throws NullPointerException if {@code context}, {@code modules} or {@code implementation} is {@code null}.
*
* @see SourceSectionType#getName()
* @see Implementation#getJavaTypeName()
* @since 1.6
*/
protected String getDefaultSourceSectionName( final ModelContext context, final Modules modules,
final Implementation implementation )
{
if ( context == null )
{
throw new NullPointerException( "context" );
}
if ( modules == null )
{
throw new NullPointerException( "modules" );
}
if ( implementation == null )
{
throw new NullPointerException( "implementation" );
}
String sectionName = null;
try
{
final JavaTypeName javaTypeName = implementation.getJavaTypeName();
if ( javaTypeName != null )
{
sectionName = javaTypeName.getName( false );
}
}
catch ( final ModelObjectException e )
{
context.log( Level.WARNING, getMessage( e ), null );
}
return sectionName;
} | |
| File | Line |
|---|---|
| org/jomc/tools/modlet/ToolsModelProcessor.java | 245 |
| org/jomc/tools/modlet/ToolsModelProvider.java | 259 |
public ToolsModelProcessor()
{
super();
}
/**
* Gets a flag indicating the processor is enabled by default.
* <p>
* The default enabled flag is controlled by system property
* {@code org.jomc.tools.modlet.ToolsModelProcessor.defaultEnabled} holding a value indicating the processor is
* enabled by default. If that property is not set, the {@code true} default is returned.
* </p>
*
* @return {@code true}, if the processor is enabled by default; {@code false}, if the processor is disabled by
* default.
*
* @see #setDefaultEnabled(java.lang.Boolean)
*/
public static boolean isDefaultEnabled()
{
if ( defaultEnabled == null )
{
defaultEnabled = Boolean.valueOf( System.getProperty( DEFAULT_ENABLED_PROPERTY_NAME,
Boolean.toString( DEFAULT_ENABLED ) ) );
}
return defaultEnabled;
}
/**
* Sets the flag indicating the processor is enabled by default.
*
* @param value The new value of the flag indicating the processor is enabled by default or {@code null}.
*
* @see #isDefaultEnabled()
*/
public static void setDefaultEnabled( final Boolean value )
{
defaultEnabled = value;
}
/**
* Gets a flag indicating the processor is enabled.
*
* @return {@code true}, if the processor is enabled; {@code false}, if the processor is disabled.
*
* @see #isDefaultEnabled()
* @see #setEnabled(java.lang.Boolean)
*/
public final boolean isEnabled()
{
if ( this.enabled == null )
{
this.enabled = isDefaultEnabled();
}
return this.enabled;
}
/**
* Sets the flag indicating the processor is enabled.
*
* @param value The new value of the flag indicating the processor is enabled or {@code null}.
*
* @see #isEnabled()
*/
public final void setEnabled( final Boolean value )
{
this.enabled = value;
}
/**
* Gets a flag indicating model object class path resolution is enabled by default.
* <p>
* The model object class path resolution default enabled flag is controlled by system property
* {@code org.jomc.tools.modlet.ToolsModelProcessor.defaultModelObjectClasspathResolutionEnabled} holding a value
* indicating model object class path resolution is enabled by default. If that property is not set, the
* {@code true} default is returned.
* </p>
*
* @return {@code true}, if model object class path resolution is enabled by default; {@code false}, if model object
* class path resolution is disabled by default.
*
* @see #setDefaultModelObjectClasspathResolutionEnabled(java.lang.Boolean)
*/
public static boolean isDefaultModelObjectClasspathResolutionEnabled()
{
if ( defaultModelObjectClasspathResolutionEnabled == null )
{
defaultModelObjectClasspathResolutionEnabled = Boolean.valueOf( System.getProperty(
DEFAULT_MODEL_OBJECT_CLASSPATH_RESOLUTION_ENABLED_PROPERTY_NAME,
Boolean.toString( DEFAULT_MODEL_OBJECT_CLASSPATH_RESOLUTION_ENABLED ) ) );
}
return defaultModelObjectClasspathResolutionEnabled;
}
/**
* Sets the flag indicating model object class path resolution is enabled by default.
*
* @param value The new value of the flag indicating model object class path resolution is enabled by default or
* {@code null}.
*
* @see #isDefaultModelObjectClasspathResolutionEnabled()
*/
public static void setDefaultModelObjectClasspathResolutionEnabled( final Boolean value )
{
defaultModelObjectClasspathResolutionEnabled = value;
}
/**
* Gets a flag indicating model object class path resolution is enabled.
*
* @return {@code true}, if model object class path resolution is enabled; {@code false}, if model object class path
* resolution is disabled.
*
* @see #isDefaultModelObjectClasspathResolutionEnabled()
* @see #setModelObjectClasspathResolutionEnabled(java.lang.Boolean)
*/
public final boolean isModelObjectClasspathResolutionEnabled()
{
if ( this.modelObjectClasspathResolutionEnabled == null )
{
this.modelObjectClasspathResolutionEnabled = isDefaultModelObjectClasspathResolutionEnabled();
}
return this.modelObjectClasspathResolutionEnabled;
}
/**
* Sets the flag indicating model object class path resolution is is enabled.
*
* @param value The new value of the flag indicating model object class path resolution is enabled or {@code null}.
*
* @see #isModelObjectClasspathResolutionEnabled()
*/
public final void setModelObjectClasspathResolutionEnabled( final Boolean value )
{
this.modelObjectClasspathResolutionEnabled = value;
}
/**
* Gets the head comment the processor is applying by default.
* <p>
* The default head comment is controlled by system property
* {@code org.jomc.tools.modlet.ToolsModelProcessor.defaultHeadComment} holding the head comment the processor is
* applying by default. If that property is not set, the {@code //} default is returned.
* </p>
*
* @return The head comment the processor is applying by default or {@code null}.
*
* @see #setDefaultHeadComment(java.lang.String)
* @since 1.6
*/
public static String getDefaultHeadComment()
{
if ( defaultHeadComment == null )
{
defaultHeadComment = System.getProperty( DEFAULT_HEAD_COMMENT_PROPERTY_NAME, DEFAULT_HEAD_COMMENT );
}
return defaultHeadComment;
}
/**
* Sets the head comment the processor is applying by default.
*
* @param value The new head comment the processor is applying by default or {@code null}.
*
* @see #getDefaultHeadComment()
* @since 1.6
*/
public static void setDefaultHeadComment( final String value )
{
defaultHeadComment = value;
}
/**
* Gets the head comment the processor is applying.
*
* @return The head comment the processor is applying or {@code null}.
*
* @see #getDefaultHeadComment()
* @see #setDefaultHeadComment(java.lang.String)
* @since 1.6
*/
public final String getHeadComment()
{
if ( this.headComment == null )
{
this.headComment = getDefaultHeadComment();
}
return this.headComment;
}
/**
* Sets the head comment the processor is applying.
*
* @param value The new head comment the processor is applying or {@code null}.
*
* @see #getHeadComment()
* @since 1.6
*/
public final void setHeadComment( final String value )
{
this.headComment = value;
}
/**
* Gets the tail comment the processor is applying by default.
* <p>
* The default tail comment is controlled by system property
* {@code org.jomc.tools.modlet.ToolsModelProcessor.defaultTailComment} holding the tail comment the processor is
* applying by default. If that property is not set, the {@code null} default is returned.
* </p>
*
* @return The tail comment the processor is applying by default or {@code null}.
*
* @see #setDefaultTailComment(java.lang.String)
* @since 1.6
*/
public static String getDefaultTailComment()
{
if ( defaultTailComment == null )
{
defaultTailComment = System.getProperty( DEFAULT_TAIL_COMMENT_PROPERTY_NAME, DEFAULT_TAIL_COMMENT );
}
return defaultTailComment;
}
/**
* Sets the tail comment the processor is applying by default.
*
* @param value The new tail comment the processor is applying by default or {@code null}.
*
* @see #getDefaultTailComment()
* @since 1.6
*/
public static void setDefaultTailComment( final String value )
{
defaultTailComment = value;
}
/**
* Gets the tail comment the processor is applying.
*
* @return The tail comment the processor is applying or {@code null}.
*
* @see #getDefaultTailComment()
* @see #setDefaultTailComment(java.lang.String)
* @since 1.6
*/
public final String getTailComment()
{
if ( this.tailComment == null )
{
this.tailComment = getDefaultTailComment();
}
return this.tailComment;
}
/**
* Sets the tail comment the processor is applying.
*
* @param value The new tail comment the processor is applying or {@code null}.
*
* @see #getTailComment()
* @since 1.6
*/
public final void setTailComment( final String value )
{
this.tailComment = value;
}
/**
* {@inheritDoc}
*
* @see #isEnabled()
* @see #isModelObjectClasspathResolutionEnabled()
* @see #getHeadComment()
* @see #getTailComment()
* @see #ENABLED_ATTRIBUTE_NAME
* @see #MODEL_OBJECT_CLASSPATH_RESOLUTION_ENABLED_ATTRIBUTE_NAME
* @see #HEAD_COMMENT_ATTRIBUTE_NAME
* @see #TAIL_COMMENT_ATTRIBUTE_NAME
*/
public Model processModel( final ModelContext context, final Model model ) throws ModelException | |
| File | Line |
|---|---|
| org/jomc/tools/modlet/ToolsModelValidator.java | 924 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 976 |
for ( final SourceFileType s : sourceFileType )
{
report.getDetails().add( new ModelValidationReport.Detail(
"IMPLEMENTATION_DEPENDENCY_SOURCE_FILE_CONSTRAINT", Level.SEVERE, getMessage(
"dependencySourceFileConstraint", module.getName(), implementation.getIdentifier(),
d.getName(), s.getIdentifier() ),
new org.jomc.model.ObjectFactory().createImplementation( implementation ) ) );
if ( this.isValidateJava() )
{
for ( final TemplateParameterType p : s.getTemplateParameter() )
{
try
{
p.getJavaValue( context.getClassLoader() );
}
catch ( final ModelObjectException e )
{
final String message = getMessage( e );
if ( context.isLoggable( Level.FINE ) )
{
context.log( Level.FINE, message, e );
}
report.getDetails().add( new ModelValidationReport.Detail(
"IMPLEMENTATION_DEPENDENCY_SOURCE_FILE_TEMPLATE_PARAMETER_JAVA_VALUE_CONSTRAINT",
Level.SEVERE, getMessage(
"dependencySourceFileTemplateParameterJavaValueConstraint",
module.getName(), implementation.getIdentifier(), d.getName(),
s.getIdentifier(), p.getName(),
message != null && message.length() > 0 ? " " + message : "" ),
new org.jomc.model.ObjectFactory().createImplementation( implementation ) ) );
}
}
}
this.validateTemplateParameters(
report, context, s.getSourceSections(),
"IMPLEMENTATION_DEPENDENCY_SOURCE_FILE_SECTION_TEMPLATE_PARAMETER_JAVA_VALUE_CONSTRAINT",
new org.jomc.model.ObjectFactory().createImplementation( implementation ),
"dependencySourceFileSectionTemplateParameterJavaValueConstraint",
module.getName(), implementation.getIdentifier(), d.getName(), s.getIdentifier() );
} | |
| File | Line |
|---|---|
| org/jomc/tools/modlet/ToolsModelValidator.java | 1163 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 1215 |
for ( final SourceFileType s : sourceFileType )
{
report.getDetails().add( new ModelValidationReport.Detail(
"IMPLEMENTATION_MESSAGE_SOURCE_FILE_CONSTRAINT", Level.SEVERE, getMessage(
"messageSourceFileConstraint", module.getName(), implementation.getIdentifier(),
m.getName(), s.getIdentifier() ),
new org.jomc.model.ObjectFactory().createImplementation( implementation ) ) );
if ( this.isValidateJava() )
{
for ( final TemplateParameterType p : s.getTemplateParameter() )
{
try
{
p.getJavaValue( context.getClassLoader() );
}
catch ( final ModelObjectException e )
{
final String message = getMessage( e );
if ( context.isLoggable( Level.FINE ) )
{
context.log( Level.FINE, message, e );
}
report.getDetails().add( new ModelValidationReport.Detail(
"IMPLEMENTATION_MESSAGE_SOURCE_FILE_TEMPLATE_PARAMETER_JAVA_VALUE_CONSTRAINT",
Level.SEVERE, getMessage(
"messageSourceFileTemplateParameterJavaValueConstraint",
module.getName(), implementation.getIdentifier(), m.getName(),
s.getIdentifier(), p.getName(),
message != null && message.length() > 0 ? " " + message : "" ),
new org.jomc.model.ObjectFactory().createImplementation( implementation ) ) );
}
}
}
this.validateTemplateParameters(
report, context, s.getSourceSections(),
"IMPLEMENTATION_MESSAGE_SOURCE_FILE_SECTION_TEMPLATE_PARAMETER_JAVA_VALUE_CONSTRAINT",
new org.jomc.model.ObjectFactory().createImplementation( implementation ),
"messageSourceFileSectionTemplateParameterJavaValueConstraint",
module.getName(), implementation.getIdentifier(), m.getName(), s.getIdentifier() );
} | |
| File | Line |
|---|---|
| org/jomc/tools/modlet/ToolsModelValidator.java | 1037 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 1089 |
for ( final SourceSectionType s : sourceSectionType )
{
report.getDetails().add( new ModelValidationReport.Detail(
"IMPLEMENTATION_DEPENDENCY_SOURCE_SECTION_CONSTRAINT", Level.SEVERE, getMessage(
"dependencySourceSectionConstraint", module.getName(), implementation.getIdentifier(),
d.getName(), s.getName() ),
new org.jomc.model.ObjectFactory().createImplementation( implementation ) ) );
if ( this.isValidateJava() )
{
for ( final TemplateParameterType p : s.getTemplateParameter() )
{
try
{
p.getJavaValue( context.getClassLoader() );
}
catch ( final ModelObjectException e )
{
final String message = getMessage( e );
if ( context.isLoggable( Level.FINE ) )
{
context.log( Level.FINE, message, e );
}
report.getDetails().add( new ModelValidationReport.Detail(
"IMPLEMENTATION_DEPENDENCY_SOURCE_SECTION_TEMPLATE_PARAMETER_JAVA_VALUE_CONSTRAINT",
Level.SEVERE, getMessage(
"dependencySourceSectionTemplateParameterJavaValueConstraint",
module.getName(), implementation.getIdentifier(), d.getName(),
s.getName(), p.getName(),
message != null && message.length() > 0 ? " " + message : "" ),
new org.jomc.model.ObjectFactory().createImplementation( implementation ) ) );
}
}
}
this.validateTemplateParameters(
report, context, s.getSourceSections(),
"IMPLEMENTATION_DEPENDENCY_SOURCE_SECTION_TEMPLATE_PARAMETER_JAVA_VALUE_CONSTRAINT",
new org.jomc.model.ObjectFactory().createImplementation( implementation ),
"dependencySourceSectionTemplateParameterJavaValueConstraint",
module.getName(), implementation.getIdentifier(), d.getName() );
} | |
| File | Line |
|---|---|
| org/jomc/tools/modlet/ToolsModelValidator.java | 1276 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 1328 |
for ( final SourceSectionType s : sourceSectionType )
{
report.getDetails().add( new ModelValidationReport.Detail(
"IMPLEMENTATION_MESSAGE_SOURCE_SECTION_CONSTRAINT", Level.SEVERE, getMessage(
"messageSourceSectionConstraint", module.getName(), implementation.getIdentifier(),
m.getName(), s.getName() ),
new org.jomc.model.ObjectFactory().createImplementation( implementation ) ) );
if ( this.isValidateJava() )
{
for ( final TemplateParameterType p : s.getTemplateParameter() )
{
try
{
p.getJavaValue( context.getClassLoader() );
}
catch ( final ModelObjectException e )
{
final String message = getMessage( e );
if ( context.isLoggable( Level.FINE ) )
{
context.log( Level.FINE, message, e );
}
report.getDetails().add( new ModelValidationReport.Detail(
"IMPLEMENTATION_MESSAGE_SOURCE_SECTION_TEMPLATE_PARAMETER_JAVA_VALUE_CONSTRAINT",
Level.SEVERE, getMessage(
"messageSourceSectionTemplateParameterJavaValueConstraint",
module.getName(), implementation.getIdentifier(), m.getName(),
s.getName(), p.getName(),
message != null && message.length() > 0 ? " " + message : "" ),
new org.jomc.model.ObjectFactory().createImplementation( implementation ) ) );
}
}
}
this.validateTemplateParameters(
report, context, s.getSourceSections(),
"IMPLEMENTATION_MESSAGE_SOURCE_SECTION_TEMPLATE_PARAMETER_JAVA_VALUE_CONSTRAINT",
new org.jomc.model.ObjectFactory().createImplementation( implementation ),
"messageSourceSectionTemplateParameterJavaValueConstraint",
module.getName(), implementation.getIdentifier(), m.getName() );
} | |
| File | Line |
|---|---|
| org/jomc/tools/modlet/ToolsModelValidator.java | 792 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 842 |
for ( final SourceSectionType s : sourceSectionType )
{
report.getDetails().add( new ModelValidationReport.Detail(
"IMPLEMENTATION_SOURCE_SECTION_CONSTRAINT", Level.SEVERE, getMessage(
"implementationSourceSectionConstraint", module.getName(), implementation.getIdentifier(),
s.getName() ), new org.jomc.model.ObjectFactory().createImplementation( implementation ) ) );
if ( this.isValidateJava() )
{
for ( final TemplateParameterType p : s.getTemplateParameter() )
{
try
{
p.getJavaValue( context.getClassLoader() );
}
catch ( final ModelObjectException e )
{
final String message = getMessage( e );
if ( context.isLoggable( Level.FINE ) )
{
context.log( Level.FINE, message, e );
}
report.getDetails().add( new ModelValidationReport.Detail(
"IMPLEMENTATION_SOURCE_SECTION_TEMPLATE_PARAMETER_JAVA_VALUE_CONSTRAINT", Level.SEVERE,
getMessage( "implementationSourceSectionTemplateParameterJavaValueConstraint",
module.getName(), implementation.getIdentifier(),
s.getName(), p.getName(),
message != null && message.length() > 0 ? " " + message : "" ),
new org.jomc.model.ObjectFactory().createImplementation( implementation ) ) );
}
}
}
this.validateTemplateParameters(
report, context, s.getSourceSections(),
"IMPLEMENTATION_SOURCE_SECTION_TEMPLATE_PARAMETER_JAVA_VALUE_CONSTRAINT",
new org.jomc.model.ObjectFactory().createImplementation( implementation ),
"implementationSourceSectionTemplateParameterJavaValueConstraint",
module.getName(), implementation.getIdentifier() );
} | |
| File | Line |
|---|---|
| org/jomc/tools/modlet/ToolsModelValidator.java | 1517 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 1567 |
for ( final SourceSectionType s : sourceSectionType )
{
report.getDetails().add( new ModelValidationReport.Detail(
"SPECIFICATION_SOURCE_SECTION_CONSTRAINT", Level.SEVERE, getMessage(
"specificationSourceSectionConstraint", specification.getIdentifier(), s.getName() ),
new org.jomc.model.ObjectFactory().createSpecification( specification ) ) );
if ( this.isValidateJava() )
{
for ( final TemplateParameterType p : s.getTemplateParameter() )
{
try
{
p.getJavaValue( context.getClassLoader() );
}
catch ( final ModelObjectException e )
{
final String message = getMessage( e );
if ( context.isLoggable( Level.FINE ) )
{
context.log( Level.FINE, message, e );
}
report.getDetails().add( new ModelValidationReport.Detail(
"SPECIFICATION_SOURCE_SECTION_TEMPLATE_PARAMETER_JAVA_VALUE_CONSTRAINT",
Level.SEVERE, getMessage(
"specificationSourceSectionTemplateParameterJavaValueConstraint",
module.getName(), specification.getIdentifier(), s.getName(), p.getName(),
message != null && message.length() > 0 ? " " + message : "" ),
new org.jomc.model.ObjectFactory().createSpecification( specification ) ) );
}
}
}
this.validateTemplateParameters(
report, context, s.getSourceSections(),
"SPECIFICATION_SOURCE_SECTION_TEMPLATE_PARAMETER_JAVA_VALUE_CONSTRAINT",
new org.jomc.model.ObjectFactory().createSpecification( specification ),
"specificationSourceSectionTemplateParameterJavaValueConstraint",
module.getName(), specification.getIdentifier() );
} | |
| File | Line |
|---|---|
| org/jomc/tools/model/SourceFileType.java | 954 |
| org/jomc/tools/model/SourceSectionType.java | 923 |
clone.override = ((this.override == null)?null:this.isOverride());
return clone;
}
}
/**
* Gets a single {@code JAXBElement} matching a namespace URI and local part from the {@code any} property of the
* instance.
*
* @param namespaceURI The namespace URI of the {@code JAXBElement} to return.
* @param localPart The local part of the {@code JAXBElement} to return.
* @param type The class of the type the element is bound to.
* @param <T> The type the element is bound to.
*
* @return The {@code JAXBElement} matching {@code namespaceURI} and {@code localPart} from the {@code any} property
* of the instance or {@code null}, if no such element is found.
*
* @throws NullPointerException if {@code namespaceURI}, {@code localPart} or {@code type} is {@code null}.
* @throws IllegalStateException if the {@code any} property contains more than one matching element.
*
* @see #getAnyElement(java.util.List, java.lang.String, java.lang.String, java.lang.Class)
*/
public <T> javax.xml.bind.JAXBElement<T> getAnyElement( final String namespaceURI, final String localPart,
final Class<T> type )
{
return this.getAnyElement( this.getAny(), namespaceURI, localPart, type );
}
/**
* Gets a list containing all {@code JAXBElement}s matching a namespace URI and local part from the {@code any}
* property of the instance.
*
* @param namespaceURI The namespace URI of the {@code JAXBElement}s to return.
* @param localPart The local part of the {@code JAXBElement}s to return.
* @param type The class of the type the elements are bound to.
* @param <T> The type the elements are bound to.
*
* @return An unmodifiable list of all {@code JAXBElement}s matching {@code namespaceURI} and {@code localPart} from
* the {@code any} property of the instance - an empty list if no such elements are found.
*
* @throws NullPointerException if {@code namespaceURI}, {@code localPart} or {@code type} is {@code null}.
*
* @see #getAnyElements(java.util.List, java.lang.String, java.lang.String, java.lang.Class)
*/
public <T> java.util.List<javax.xml.bind.JAXBElement<T>> getAnyElements( final String namespaceURI,
final String localPart,
final Class<T> type )
{
return this.getAnyElements( this.getAny(), namespaceURI, localPart, type );
}
/**
* Gets a single object matching a given class from the {@code any} property of the instance.
*
* @param clazz The class to return an instance of.
* @param <T> The type of the object to return.
*
* @return The instance of {@code clazz} from the {@code any} property of the instance or {@code null}, if no such
* instance is found.
*
* @throws NullPointerException if {@code clazz} is {@code null}.
* @throws IllegalStateException if the {@code any} property contains more than one matching object.
*
* @see #getAnyObject(java.util.List, java.lang.Class)
*/
public <T> T getAnyObject( final Class<T> clazz )
{
return this.getAnyObject( this.getAny(), clazz );
}
/**
* Gets a list containing all objects matching a given class from the {@code any} property of the instance.
*
* @param clazz The class to return all instances of.
* @param <T> The type of the objects to return.
*
* @return An unmodifiable list of all instances of {@code clazz} from the {@code any} property of the instance -
* an empty list if no such objects are found.
*
* @throws NullPointerException if {@code clazz} is {@code null}.
*
* @see #getAnyObjects(java.util.List, java.lang.Class)
*/
public <T> java.util.List<T> getAnyObjects( final Class<T> clazz )
{
return this.getAnyObjects( this.getAny(), clazz );
}
/**
* Gets a template parameter for a given name from the list of template parameters.
*
* @param name The name of the template parameter to return.
*
* @return The first matching template parameter or {@code null}, if no such template parameter is found.
*
* @throws NullPointerException if {@code name} is {@code null}.
*
* @see #getTemplateParameter()
* @see TemplateParameterType#getName()
* @since 1.6
*/
public TemplateParameterType getTemplateParameter( final String name )
{
if ( name == null )
{
throw new NullPointerException( "name" );
}
for ( int i = 0, s0 = this.getTemplateParameter().size(); i < s0; i++ )
{
final TemplateParameterType t = this.getTemplateParameter().get( i );
if ( name.equals( t.getName() ) )
{
return t;
}
}
return null;
}
} | |
| File | Line |
|---|---|
| org/jomc/tools/ClassFileProcessor.java | 2626 |
| org/jomc/tools/ResourceFileProcessor.java | 555 |
randomAccessFile = new RandomAccessFile( classFile, "rw" );
fileChannel = randomAccessFile.getChannel();
fileLock = fileChannel.lock();
fileChannel.truncate( bytes.length );
fileChannel.position( 0L );
fileChannel.write( ByteBuffer.wrap( bytes ) );
fileChannel.force( true );
suppressExceptionOnClose = false;
}
finally
{
this.releaseAndClose( fileLock, fileChannel, randomAccessFile, suppressExceptionOnClose );
}
}
private void releaseAndClose( final FileLock fileLock, final FileChannel fileChannel,
final Closeable closeable, final boolean suppressExceptions )
throws IOException
{
try
{
if ( fileLock != null )
{
fileLock.release();
}
}
catch ( final IOException e )
{
if ( suppressExceptions )
{
this.log( Level.SEVERE, null, e );
}
else
{
throw e;
}
}
finally
{
try
{
if ( fileChannel != null )
{
fileChannel.close();
}
}
catch ( final IOException e )
{
if ( suppressExceptions )
{
this.log( Level.SEVERE, null, e );
}
else
{
throw e;
}
}
finally
{
try
{
if ( closeable != null )
{
closeable.close();
}
}
catch ( final IOException e )
{
if ( suppressExceptions )
{
this.log( Level.SEVERE, null, e );
}
else
{
throw e;
}
}
}
}
}
private static String getMessage( final String key, final Object... arguments )
{ | |
| File | Line |
|---|---|
| org/jomc/tools/modlet/ToolsModelValidator.java | 227 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 275 |
for ( final SourceFileType s : sourceFileType )
{
report.getDetails().add( new ModelValidationReport.Detail(
"MODEL_SOURCE_FILE_CONSTRAINT", Level.SEVERE, getMessage(
"modelSourceFileConstraint", model.getIdentifier(), s.getIdentifier() ),
new ObjectFactory().createSourceFile( s ) ) );
if ( this.isValidateJava() )
{
for ( final TemplateParameterType p : s.getTemplateParameter() )
{
try
{
p.getJavaValue( context.getClassLoader() );
}
catch ( final ModelObjectException e )
{
final String message = getMessage( e );
if ( context.isLoggable( Level.FINE ) )
{
context.log( Level.FINE, message, e );
}
report.getDetails().add( new ModelValidationReport.Detail(
"MODEL_SOURCE_FILE_TEMPLATE_PARAMETER_JAVA_VALUE_CONSTRAINT", Level.SEVERE, getMessage(
"modelSourceFileTemplateParameterJavaValueConstraint", model.getIdentifier(),
s.getIdentifier(), p.getName(),
message != null && message.length() > 0 ? " " + message : "" ),
new ObjectFactory().createSourceFile( s ) ) );
}
}
}
this.validateTemplateParameters( report, context, s.getSourceSections(),
"MODEL_SOURCE_FILE_SECTION_TEMPLATE_PARAMETER_JAVA_VALUE_CONSTRAINT",
new ObjectFactory().createSourceFile( s ),
"modelSourceFileSectionTemplateParameterJavaValueConstraint",
model.getIdentifier(), s.getIdentifier() );
} | |
| File | Line |
|---|---|
| org/jomc/tools/modlet/ToolsModelValidator.java | 434 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 483 |
for ( final SourceFileType s : sourceFileType )
{
report.getDetails().add( new ModelValidationReport.Detail(
"MODULE_SOURCE_FILE_CONSTRAINT", Level.SEVERE, getMessage(
"moduleSourceFileConstraint", module.getName(), s.getIdentifier() ),
new ObjectFactory().createSourceFile( s ) ) );
if ( this.isValidateJava() )
{
for ( final TemplateParameterType p : s.getTemplateParameter() )
{
try
{
p.getJavaValue( context.getClassLoader() );
}
catch ( final ModelObjectException e )
{
final String message = getMessage( e );
if ( context.isLoggable( Level.FINE ) )
{
context.log( Level.FINE, message, e );
}
report.getDetails().add( new ModelValidationReport.Detail(
"MODULE_SOURCE_FILE_TEMPLATE_PARAMETER_JAVA_VALUE_CONSTRAINT", Level.SEVERE, getMessage(
"moduleSourceFileTemplateParameterJavaValueConstraint", module.getName(),
s.getIdentifier(), p.getName(),
message != null && message.length() > 0 ? " " + message : "" ),
new ObjectFactory().createSourceFile( s ) ) );
}
}
}
this.validateTemplateParameters(
report, context, s.getSourceSections(),
"MODULE_SOURCE_FILE_SECTION_TEMPLATE_PARAMETER_JAVA_VALUE_CONSTRAINT",
new ObjectFactory().createSourceFile( s ),
"moduleSourceFileSectionTemplateParameterJavaValueConstraint",
module.getName(), s.getIdentifier() );
} | |
| File | Line |
|---|---|
| org/jomc/tools/modlet/ToolsModelValidator.java | 540 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 589 |
for ( final SourceSectionType s : sourceSectionType )
{
report.getDetails().add( new ModelValidationReport.Detail(
"MODULE_SOURCE_SECTION_CONSTRAINT", Level.SEVERE, getMessage(
"moduleSourceSectionConstraint", module.getName(), s.getName() ),
new ObjectFactory().createSourceSection( s ) ) );
if ( this.isValidateJava() )
{
for ( final TemplateParameterType p : s.getTemplateParameter() )
{
try
{
p.getJavaValue( context.getClassLoader() );
}
catch ( final ModelObjectException e )
{
final String message = getMessage( e );
if ( context.isLoggable( Level.FINE ) )
{
context.log( Level.FINE, message, e );
}
report.getDetails().add( new ModelValidationReport.Detail(
"MODULE_SOURCE_SECTION_TEMPLATE_PARAMETER_JAVA_VALUE_CONSTRAINT", Level.SEVERE,
getMessage( "moduleSourceSectionTemplateParameterJavaValueConstraint",
module.getName(), s.getName(), p.getName(),
message != null && message.length() > 0 ? " " + message : "" ),
new ObjectFactory().createSourceSection( s ) ) );
}
}
}
this.validateTemplateParameters(
report, context, s.getSourceSections(),
"MODULE_SOURCE_SECTION_TEMPLATE_PARAMETER_JAVA_VALUE_CONSTRAINT",
new ObjectFactory().createSourceSection( s ),
"moduleSourceSectionTemplateParameterJavaValueConstraint",
module.getName(), s.getName() );
} | |
| File | Line |
|---|---|
| org/jomc/tools/modlet/ToolsModelValidator.java | 674 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 748 |
for ( final SourceFileType s : sourceFileType )
{
if ( this.isValidateJava() )
{
for ( final TemplateParameterType p : s.getTemplateParameter() )
{
try
{
p.getJavaValue( context.getClassLoader() );
}
catch ( final ModelObjectException e )
{
final String message = getMessage( e );
if ( context.isLoggable( Level.FINE ) )
{
context.log( Level.FINE, message, e );
}
report.getDetails().add( new ModelValidationReport.Detail(
"IMPLEMENTATION_SOURCE_FILE_TEMPLATE_PARAMETER_JAVA_VALUE_CONSTRAINT", Level.SEVERE,
getMessage( "implementationSourceFileTemplateParameterJavaValueConstraint",
module.getName(), implementation.getIdentifier(),
s.getIdentifier(), p.getName(),
message != null && message.length() > 0 ? " " + message : "" ),
new org.jomc.model.ObjectFactory().createImplementation( implementation ) ) );
}
}
}
this.validateTemplateParameters(
report, context, s.getSourceSections(),
"IMPLEMENTATION_SOURCE_FILE_SECTION_TEMPLATE_PARAMETER_JAVA_VALUE_CONSTRAINT",
new org.jomc.model.ObjectFactory().createImplementation( implementation ),
"implementationSourceFileSectionTemplateParameterJavaValueConstraint",
module.getName(), implementation.getIdentifier(), s.getIdentifier() );
} | |
| File | Line |
|---|---|
| org/jomc/tools/modlet/ToolsModelValidator.java | 1399 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 1463 |
for ( final SourceFileType s : sourceFileType )
{
if ( this.isValidateJava() )
{
for ( final TemplateParameterType p : s.getTemplateParameter() )
{
try
{
p.getJavaValue( context.getClassLoader() );
}
catch ( final ModelObjectException e )
{
final String message = getMessage( e );
if ( context.isLoggable( Level.FINE ) )
{
context.log( Level.FINE, message, e );
}
report.getDetails().add( new ModelValidationReport.Detail(
"SPECIFICATION_SOURCE_FILE_TEMPLATE_PARAMETER_JAVA_VALUE_CONSTRAINT",
Level.SEVERE, getMessage(
"specificationSourceFileTemplateParameterJavaValueConstraint",
module.getName(), specification.getIdentifier(), s.getIdentifier(), p.getName(),
message != null && message.length() > 0 ? " " + message : "" ),
new org.jomc.model.ObjectFactory().createSpecification( specification ) ) );
}
}
}
this.validateTemplateParameters(
report, context, s.getSourceSections(),
"SPECIFICATION_SOURCE_FILE_SECTION_TEMPLATE_PARAMETER_JAVA_VALUE_CONSTRAINT",
new org.jomc.model.ObjectFactory().createSpecification( specification ),
"specificationSourceFileSectionTemplateParameterJavaValueConstraint",
module.getName(), specification.getIdentifier(), s.getIdentifier() );
} | |
| File | Line |
|---|---|
| org/jomc/tools/modlet/ToolsModelProcessor.java | 906 |
| org/jomc/tools/modlet/ToolsModelProcessor.java | 1080 |
throw new NullPointerException( "specification" );
}
if ( sourceFilesType == null )
{
throw new NullPointerException( "sourceFilesType" );
}
String contextHeadComment = this.getHeadComment();
if ( ( DEFAULT_HEAD_COMMENT != null
? DEFAULT_HEAD_COMMENT.equals( contextHeadComment )
: contextHeadComment == null )
&& context.getAttribute( HEAD_COMMENT_ATTRIBUTE_NAME ) instanceof String )
{
contextHeadComment = (String) context.getAttribute( HEAD_COMMENT_ATTRIBUTE_NAME );
}
if ( contextHeadComment != null && contextHeadComment.length() == 0 )
{
contextHeadComment = null;
}
String contextTailComment = this.getTailComment();
if ( ( DEFAULT_TAIL_COMMENT != null
? DEFAULT_TAIL_COMMENT.equals( contextTailComment )
: contextTailComment == null )
&& context.getAttribute( TAIL_COMMENT_ATTRIBUTE_NAME ) instanceof String )
{
contextTailComment = (String) context.getAttribute( TAIL_COMMENT_ATTRIBUTE_NAME );
}
if ( contextTailComment != null && contextTailComment.length() == 0 )
{
contextTailComment = null;
}
for ( int i = 0, s0 = sourceFilesType.getSourceFile().size(); i < s0; i++ )
{
final SourceFileType s = sourceFilesType.getSourceFile().get( i );
if ( s.getTemplate() == null )
{
s.setTemplate( SPECIFICATION_TEMPLATE ); | |
| File | Line |
|---|---|
| org/jomc/tools/ClassFileProcessor.java | 2153 |
| org/jomc/tools/ClassFileProcessor.java | 2520 |
final File classesDirectory ) throws IOException, ModelObjectException
{
if ( specification.isClassDeclaration() && specification.getJavaTypeName() != null )
{
final String classLocation =
specification.getJavaTypeName().getClassName().replace( '.', File.separatorChar ) + ".class";
final File classFile = new File( classesDirectory, classLocation );
if ( !classesDirectory.isDirectory() )
{
throw new IOException( getMessage( "directoryNotFound", classesDirectory.getAbsolutePath() ) );
}
if ( !classFile.isFile() )
{
throw new IOException( getMessage( "fileNotFound", classFile.getAbsolutePath() ) );
}
if ( !( classFile.canRead() && classFile.canWrite() ) )
{
throw new IOException( getMessage( "fileAccessDenied", classFile.getAbsolutePath() ) );
}
if ( this.isLoggable( Level.INFO ) )
{
this.log( Level.INFO, getMessage( "committing", classFile.getAbsolutePath() ), null ); | |
| File | Line |
|---|---|
| org/jomc/tools/ClassFileProcessor.java | 2187 |
| org/jomc/tools/ClassFileProcessor.java | 2555 |
final File classesDirectory ) throws IOException, ModelObjectException
{
if ( implementation.isClassDeclaration() && implementation.getJavaTypeName() != null )
{
final String classLocation =
implementation.getJavaTypeName().getClassName().replace( '.', File.separatorChar ) + ".class";
final File classFile = new File( classesDirectory, classLocation );
if ( !classesDirectory.isDirectory() )
{
throw new IOException( getMessage( "directoryNotFound", classesDirectory.getAbsolutePath() ) );
}
if ( !classFile.isFile() )
{
throw new IOException( getMessage( "fileNotFound", classFile.getAbsolutePath() ) );
}
if ( !( classFile.canRead() && classFile.canWrite() ) )
{
throw new IOException( getMessage( "fileAccessDenied", classFile.getAbsolutePath() ) );
}
if ( this.isLoggable( Level.INFO ) )
{
this.log( Level.INFO, getMessage( "committing", classFile.getAbsolutePath() ), null ); | |
| File | Line |
|---|---|
| org/jomc/tools/model/SourceFileType.java | 176 |
| org/jomc/tools/model/SourceSectionType.java | 169 |
this.override = ((o.override == null)?null:o.isOverride());
}
/**
* Sections of the source file.
*
* @return
* possible object is
* {@link SourceSectionsType }
*
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
public SourceSectionsType getSourceSections() {
return sourceSections;
}
/**
* Sets the value of the sourceSections property.
*
* @param value
* allowed object is
* {@link SourceSectionsType }
*
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
public void setSourceSections(SourceSectionsType value) {
this.sourceSections = value;
}
/**
* Gets the value of the templateParameter property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the templateParameter property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getTemplateParameter().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link TemplateParameterType }
*
*
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
public List<TemplateParameterType> getTemplateParameter() {
if (templateParameter == null) {
templateParameter = new ArrayList<TemplateParameterType>();
}
return this.templateParameter;
}
/**
* Gets the value of the any property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Object }
* {@link Element }
*
*
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
/**
* Gets the value of the identifier property.
*
* @return
* possible object is
* {@link String }
*
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
public String getIdentifier() { | |
| File | Line |
|---|---|
| org/jomc/tools/ClassFileProcessor.java | 2158 |
| org/jomc/tools/ClassFileProcessor.java | 2192 |
specification.getJavaTypeName().getClassName().replace( '.', File.separatorChar ) + ".class";
final File classFile = new File( classesDirectory, classLocation );
if ( !classesDirectory.isDirectory() )
{
throw new IOException( getMessage( "directoryNotFound", classesDirectory.getAbsolutePath() ) );
}
if ( !classFile.isFile() )
{
throw new IOException( getMessage( "fileNotFound", classFile.getAbsolutePath() ) );
}
if ( !( classFile.canRead() && classFile.canWrite() ) )
{
throw new IOException( getMessage( "fileAccessDenied", classFile.getAbsolutePath() ) );
}
if ( this.isLoggable( Level.INFO ) )
{
this.log( Level.INFO, getMessage( "committing", classFile.getAbsolutePath() ), null );
}
final JavaClass javaClass = this.readJavaClass( classFile );
this.commitModelObjects( specification, marshaller, javaClass ); | |
| File | Line |
|---|---|
| org/jomc/tools/ClassFileProcessor.java | 2262 |
| org/jomc/tools/ClassFileProcessor.java | 2304 |
specification.getJavaTypeName().getClassName().replace( '.', File.separatorChar ) + ".class";
final File classFile = new File( classesDirectory, classLocation );
if ( !classesDirectory.isDirectory() )
{
throw new IOException( getMessage( "directoryNotFound", classesDirectory.getAbsolutePath() ) );
}
if ( !classFile.isFile() )
{
throw new IOException( getMessage( "fileNotFound", classFile.getAbsolutePath() ) );
}
if ( !classFile.canRead() )
{
throw new IOException( getMessage( "fileAccessDenied", classFile.getAbsolutePath() ) );
}
if ( this.isLoggable( Level.INFO ) )
{
this.log( Level.INFO, getMessage( "validating", classFile.getAbsolutePath() ), null );
}
final JavaClass javaClass = this.readJavaClass( classFile );
report.getDetails().addAll(
this.validateModelObjects( specification, unmarshaller, javaClass ).getDetails() ); | |
| File | Line |
|---|---|
| org/jomc/tools/ClassFileProcessor.java | 2525 |
| org/jomc/tools/ClassFileProcessor.java | 2560 |
specification.getJavaTypeName().getClassName().replace( '.', File.separatorChar ) + ".class";
final File classFile = new File( classesDirectory, classLocation );
if ( !classesDirectory.isDirectory() )
{
throw new IOException( getMessage( "directoryNotFound", classesDirectory.getAbsolutePath() ) );
}
if ( !classFile.isFile() )
{
throw new IOException( getMessage( "fileNotFound", classFile.getAbsolutePath() ) );
}
if ( !( classFile.canRead() && classFile.canWrite() ) )
{
throw new IOException( getMessage( "fileAccessDenied", classFile.getAbsolutePath() ) );
}
if ( this.isLoggable( Level.INFO ) )
{
this.log( Level.INFO, getMessage( "transforming", classFile.getAbsolutePath() ), null );
}
final JavaClass javaClass = this.readJavaClass( classFile );
this.transformModelObjects( specification, marshaller, unmarshaller, javaClass, transformers ); | |
| File | Line |
|---|---|
| org/jomc/tools/modlet/ToolsModelProcessor.java | 567 |
| org/jomc/tools/modlet/ToolsModelProvider.java | 581 |
final Modules modules = ModelHelper.getModules( processed );
if ( modules != null )
{
Module classpathModule = null;
if ( contextModelObjectClasspathResolutionEnabled )
{
classpathModule = modules.getClasspathModule( Modules.getDefaultClasspathModuleName(),
context.getClassLoader() );
if ( classpathModule != null
&& modules.getModule( Modules.getDefaultClasspathModuleName() ) == null )
{
modules.getModule().add( classpathModule );
}
else
{
classpathModule = null;
}
}
if ( modules.getSpecifications() != null )
{
for ( int i = 0, s0 = modules.getSpecifications().getSpecification().size(); i < s0; i++ )
{
final Specification specification = modules.getSpecifications().getSpecification().get( i );
final SourceFileType sourceFileType = specification.getAnyObject( SourceFileType.class );
final SourceFilesType sourceFilesType = specification.getAnyObject( SourceFilesType.class );
if ( sourceFileType != null ) | |
| File | Line |
|---|---|
| org/jomc/tools/model/SourceFileType.java | 479 |
| org/jomc/tools/model/SourceSectionType.java | 450 |
throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'TemplateParameter' of class 'org.jomc.tools.model.SourceFileType'."));
}
}
}
/**
* Copies all values of property {@code Any} deeply.
*
* @param source
* The source to copy from.
* @param target
* The target to copy {@code source} to.
* @throws NullPointerException
* if {@code target} is {@code null}.
*/
@SuppressWarnings("unchecked")
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
private static void copyAny(final List<Object> source, final List<Object> target) {
// CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
if ((source!= null)&&(!source.isEmpty())) {
for (final Iterator<?> it = source.iterator(); it.hasNext(); ) {
final Object next = it.next();
if (next instanceof Element) {
// CWildcardTypeInfo: org.w3c.dom.Element
target.add(((Element)((Element) next).cloneNode(true)));
continue;
}
if (next instanceof Object) {
// CBuiltinLeafInfo: java.lang.Object
target.add(copyOf(((Object) next)));
continue;
}
// Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'Any' of class 'org.jomc.tools.model.SourceFileType'.")); | |
| File | Line |
|---|---|
| org/jomc/tools/model/SourceFileType.java | 394 |
| org/jomc/tools/model/SourceFilesType.java | 128 |
}
/**
* Gets the value of the final property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
public boolean isFinal() {
if (_final == null) {
return false;
} else {
return _final;
}
}
/**
* Sets the value of the final property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
public void setFinal(Boolean value) {
this._final = value;
}
/**
* Gets the value of the override property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
public boolean isOverride() {
if (override == null) {
return false;
} else {
return override;
}
}
/**
* Sets the value of the override property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
public void setOverride(Boolean value) {
this.override = value;
}
/**
* Copies all values of property {@code TemplateParameter} deeply.
*
* @param source
* The source to copy from.
* @param target
* The target to copy {@code source} to.
* @throws NullPointerException
* if {@code target} is {@code null}.
*/
@SuppressWarnings("unchecked")
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
private static void copyTemplateParameter(final List<TemplateParameterType> source, final List<TemplateParameterType> target) { | |
| File | Line |
|---|---|
| org/jomc/tools/modlet/ToolsModelProvider.java | 983 |
| org/jomc/tools/modlet/ToolsModelProvider.java | 1105 |
throw new NullPointerException( "specification" );
}
String contextHeadComment = this.getHeadComment();
if ( ( DEFAULT_HEAD_COMMENT != null
? DEFAULT_HEAD_COMMENT.equals( contextHeadComment )
: contextHeadComment == null )
&& context.getAttribute( HEAD_COMMENT_ATTRIBUTE_NAME ) instanceof String )
{
contextHeadComment = (String) context.getAttribute( HEAD_COMMENT_ATTRIBUTE_NAME );
}
if ( contextHeadComment != null && contextHeadComment.length() == 0 )
{
contextHeadComment = null;
}
String contextTailComment = this.getTailComment();
if ( ( DEFAULT_TAIL_COMMENT != null
? DEFAULT_TAIL_COMMENT.equals( contextTailComment )
: contextTailComment == null )
&& context.getAttribute( TAIL_COMMENT_ATTRIBUTE_NAME ) instanceof String )
{
contextTailComment = (String) context.getAttribute( TAIL_COMMENT_ATTRIBUTE_NAME );
}
if ( contextTailComment != null && contextTailComment.length() == 0 )
{
contextTailComment = null;
}
final Set<String> uniqueSectionNames = new HashSet<String>( 16 );
final Set<String> sectionNames = new HashSet<String>( 16 ); | |
| File | Line |
|---|---|
| org/jomc/tools/JomcTool.java | 1739 |
| org/jomc/tools/JomcTool.java | 1801 |
String methodParameterName = null;
if ( str != null )
{
final int len = str.length();
final StringBuilder builder = new StringBuilder( len );
boolean uc = false;
for ( int i = 0; i < len; i++ )
{
final char c = str.charAt( i );
final String charString = Character.toString( c );
if ( builder.length() > 0 )
{
if ( Character.isJavaIdentifierPart( c ) )
{
builder.append( uc ? charString.toUpperCase( this.getLocale() ) : charString );
uc = false;
}
else
{
uc = true;
}
}
else if ( Character.isJavaIdentifierStart( c ) )
{
builder.append( charString.toLowerCase( this.getLocale() ) );
}
} | |
| File | Line |
|---|---|
| org/jomc/tools/ClassFileProcessor.java | 2158 |
| org/jomc/tools/ClassFileProcessor.java | 2560 |
specification.getJavaTypeName().getClassName().replace( '.', File.separatorChar ) + ".class";
final File classFile = new File( classesDirectory, classLocation );
if ( !classesDirectory.isDirectory() )
{
throw new IOException( getMessage( "directoryNotFound", classesDirectory.getAbsolutePath() ) );
}
if ( !classFile.isFile() )
{
throw new IOException( getMessage( "fileNotFound", classFile.getAbsolutePath() ) );
}
if ( !( classFile.canRead() && classFile.canWrite() ) )
{
throw new IOException( getMessage( "fileAccessDenied", classFile.getAbsolutePath() ) );
}
if ( this.isLoggable( Level.INFO ) )
{
this.log( Level.INFO, getMessage( "committing", classFile.getAbsolutePath() ), null ); | |
| File | Line |
|---|---|
| org/jomc/tools/ClassFileProcessor.java | 2192 |
| org/jomc/tools/ClassFileProcessor.java | 2525 |
implementation.getJavaTypeName().getClassName().replace( '.', File.separatorChar ) + ".class";
final File classFile = new File( classesDirectory, classLocation );
if ( !classesDirectory.isDirectory() )
{
throw new IOException( getMessage( "directoryNotFound", classesDirectory.getAbsolutePath() ) );
}
if ( !classFile.isFile() )
{
throw new IOException( getMessage( "fileNotFound", classFile.getAbsolutePath() ) );
}
if ( !( classFile.canRead() && classFile.canWrite() ) )
{
throw new IOException( getMessage( "fileAccessDenied", classFile.getAbsolutePath() ) );
}
if ( this.isLoggable( Level.INFO ) )
{
this.log( Level.INFO, getMessage( "committing", classFile.getAbsolutePath() ), null ); | |
| File | Line |
|---|---|
| org/jomc/tools/modlet/ToolsModelProcessor.java | 910 |
| org/jomc/tools/modlet/ToolsModelProcessor.java | 1084 |
| org/jomc/tools/modlet/ToolsModelProvider.java | 983 |
| org/jomc/tools/modlet/ToolsModelProvider.java | 1105 |
throw new NullPointerException( "sourceFilesType" );
}
String contextHeadComment = this.getHeadComment();
if ( ( DEFAULT_HEAD_COMMENT != null
? DEFAULT_HEAD_COMMENT.equals( contextHeadComment )
: contextHeadComment == null )
&& context.getAttribute( HEAD_COMMENT_ATTRIBUTE_NAME ) instanceof String )
{
contextHeadComment = (String) context.getAttribute( HEAD_COMMENT_ATTRIBUTE_NAME );
}
if ( contextHeadComment != null && contextHeadComment.length() == 0 )
{
contextHeadComment = null;
}
String contextTailComment = this.getTailComment();
if ( ( DEFAULT_TAIL_COMMENT != null
? DEFAULT_TAIL_COMMENT.equals( contextTailComment )
: contextTailComment == null )
&& context.getAttribute( TAIL_COMMENT_ATTRIBUTE_NAME ) instanceof String )
{
contextTailComment = (String) context.getAttribute( TAIL_COMMENT_ATTRIBUTE_NAME );
}
if ( contextTailComment != null && contextTailComment.length() == 0 )
{
contextTailComment = null;
} | |
| File | Line |
|---|---|
| org/jomc/tools/ClassFileProcessor.java | 414 |
| org/jomc/tools/ClassFileProcessor.java | 1045 |
final ObjectFactory of = new ObjectFactory();
Dependencies dependencies = this.getModules().getDependencies( implementation.getIdentifier() );
if ( dependencies == null )
{
dependencies = new Dependencies();
}
Properties properties = this.getModules().getProperties( implementation.getIdentifier() );
if ( properties == null )
{
properties = new Properties();
}
Messages messages = this.getModules().getMessages( implementation.getIdentifier() );
if ( messages == null )
{
messages = new Messages();
}
Specifications specifications = this.getModules().getSpecifications( implementation.getIdentifier() );
if ( specifications == null )
{
specifications = new Specifications();
} | |
| File | Line |
|---|---|
| org/jomc/tools/modlet/ToolsModelProvider.java | 1187 |
| org/jomc/tools/modlet/ToolsModelProvider.java | 1216 |
final String sectionName = this.getDefaultSourceSectionName( context, modules, specification );
if ( sectionName != null )
{
if ( !sectionNames.contains( sectionName ) )
{
sectionNames.add( sectionName );
s = new SourceSectionType();
s.setName( sectionName );
s.setIndentationLevel( 1 );
s.setEditable( true );
sourceFileType.getSourceSections().getSourceSection().add( s );
}
else if ( uniqueSectionNames.add( sectionName ) )
{
final Module module = modules.getModuleOfImplementation( implementation.getIdentifier() );
context.log( Level.WARNING, getMessage( "implementationSectionNameUniqueness",
implementation.getIdentifier(),
module.getName(),
sourceFileType.getIdentifier(),
sectionName ),
null );
}
} | |
| File | Line |
|---|---|
| org/jomc/tools/model/SourceFileType.java | 453 |
| org/jomc/tools/model/SourceSectionType.java | 424 |
this.override = value;
}
/**
* Copies all values of property {@code TemplateParameter} deeply.
*
* @param source
* The source to copy from.
* @param target
* The target to copy {@code source} to.
* @throws NullPointerException
* if {@code target} is {@code null}.
*/
@SuppressWarnings("unchecked")
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
private static void copyTemplateParameter(final List<TemplateParameterType> source, final List<TemplateParameterType> target) {
// CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
if ((source!= null)&&(!source.isEmpty())) {
for (final Iterator<?> it = source.iterator(); it.hasNext(); ) {
final Object next = it.next();
if (next instanceof TemplateParameterType) {
// CClassInfo: org.jomc.tools.model.TemplateParameterType
target.add(((TemplateParameterType) next).clone());
continue;
}
// Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'TemplateParameter' of class 'org.jomc.tools.model.SourceFileType'.")); | |
| File | Line |
|---|---|
| org/jomc/tools/ClassFileProcessor.java | 1671 |
| org/jomc/tools/ClassFileProcessor.java | 1887 |
this.log( Level.WARNING, getMessage( "specificationNotFound", specification.getIdentifier() ), null );
}
}
catch ( final JAXBException e )
{
String message = getMessage( e );
if ( message == null && e.getLinkedException() != null )
{
message = getMessage( e.getLinkedException() );
}
// JDK: As of JDK 6, "new IOException( message, cause )".
throw (IOException) new IOException( message ).initCause( e );
}
catch ( final TransformerException e )
{
String message = getMessage( e );
if ( message == null && e.getException() != null )
{
message = getMessage( e.getException() );
}
// JDK: As of JDK 6, "new IOException( message, cause )".
throw (IOException) new IOException( message ).initCause( e );
}
}
/**
* Transforms model objects of a given implementation of the modules of the instance.
*
* @param implementation The implementation to process.
* @param marshaller The marshaller to use for transforming model objects.
* @param unmarshaller The unmarshaller to use for transforming model objects.
* @param javaClass The java class to transform model object of.
* @param transformers The transformers to use for transforming the model objects.
*
* @throws NullPointerException if {@code implementation}, {@code marshaller}, {@code unmarshaller},
* {@code javaClass} or {@code transformers} is {@code null}.
* @throws IOException if transforming model objects fails.
*/
public void transformModelObjects( final Implementation implementation, final Marshaller marshaller, | |
| File | Line |
|---|---|
| org/jomc/tools/modlet/ToolsModelValidator.java | 929 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 981 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 1168 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 1220 |
d.getName(), s.getIdentifier() ),
new org.jomc.model.ObjectFactory().createImplementation( implementation ) ) );
if ( this.isValidateJava() )
{
for ( final TemplateParameterType p : s.getTemplateParameter() )
{
try
{
p.getJavaValue( context.getClassLoader() );
}
catch ( final ModelObjectException e )
{
final String message = getMessage( e );
if ( context.isLoggable( Level.FINE ) )
{
context.log( Level.FINE, message, e );
}
report.getDetails().add( new ModelValidationReport.Detail( | |
| File | Line |
|---|---|
| org/jomc/tools/modlet/ToolsModelValidator.java | 1042 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 1094 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 1281 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 1333 |
d.getName(), s.getName() ),
new org.jomc.model.ObjectFactory().createImplementation( implementation ) ) );
if ( this.isValidateJava() )
{
for ( final TemplateParameterType p : s.getTemplateParameter() )
{
try
{
p.getJavaValue( context.getClassLoader() );
}
catch ( final ModelObjectException e )
{
final String message = getMessage( e );
if ( context.isLoggable( Level.FINE ) )
{
context.log( Level.FINE, message, e );
}
report.getDetails().add( new ModelValidationReport.Detail( | |
| File | Line |
|---|---|
| org/jomc/tools/ClassFileProcessor.java | 2388 |
| org/jomc/tools/ClassFileProcessor.java | 2449 |
this.log( Level.INFO, getMessage( "validatingSpecification", specification.getIdentifier() ), null );
}
InputStream in = null;
JavaClass javaClass = null;
boolean suppressExceptionOnClose = true;
try
{
in = classUrl.openStream();
javaClass = new ClassParser( in, classUrl.toExternalForm() ).parse();
suppressExceptionOnClose = false;
}
finally
{
try
{
if ( in != null )
{
in.close();
}
}
catch ( final IOException e )
{
if ( suppressExceptionOnClose )
{
this.log( Level.SEVERE, getMessage( e ), e );
}
else
{
throw e;
}
}
}
report.getDetails().addAll(
this.validateModelObjects( specification, unmarshaller, javaClass ).getDetails() ); | |
| File | Line |
|---|---|
| org/jomc/tools/modlet/ToolsModelValidator.java | 796 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 846 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 1042 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 1094 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 1281 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 1333 |
"implementationSourceSectionConstraint", module.getName(), implementation.getIdentifier(),
s.getName() ), new org.jomc.model.ObjectFactory().createImplementation( implementation ) ) );
if ( this.isValidateJava() )
{
for ( final TemplateParameterType p : s.getTemplateParameter() )
{
try
{
p.getJavaValue( context.getClassLoader() );
}
catch ( final ModelObjectException e )
{
final String message = getMessage( e );
if ( context.isLoggable( Level.FINE ) )
{
context.log( Level.FINE, message, e );
}
report.getDetails().add( new ModelValidationReport.Detail( | |
| File | Line |
|---|---|
| org/jomc/tools/modlet/ToolsModelValidator.java | 670 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 1395 |
final List<SourceSectionsType> sourceSectionsType = implementation.getAnyObjects( SourceSectionsType.class );
if ( sourceFileType != null )
{
for ( final SourceFileType s : sourceFileType )
{
if ( this.isValidateJava() )
{
for ( final TemplateParameterType p : s.getTemplateParameter() )
{
try
{
p.getJavaValue( context.getClassLoader() );
}
catch ( final ModelObjectException e )
{
final String message = getMessage( e );
if ( context.isLoggable( Level.FINE ) )
{
context.log( Level.FINE, message, e );
}
report.getDetails().add( new ModelValidationReport.Detail( | |
| File | Line |
|---|---|
| org/jomc/tools/modlet/ToolsModelValidator.java | 746 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 1461 |
for ( final SourceFilesType l : sourceFilesType )
{
for ( final SourceFileType s : l.getSourceFile() )
{
if ( this.isValidateJava() )
{
for ( final TemplateParameterType p : s.getTemplateParameter() )
{
try
{
p.getJavaValue( context.getClassLoader() );
}
catch ( final ModelObjectException e )
{
final String message = getMessage( e );
if ( context.isLoggable( Level.FINE ) )
{
context.log( Level.FINE, message, e );
}
report.getDetails().add( new ModelValidationReport.Detail( | |
| File | Line |
|---|---|
| org/jomc/tools/modlet/ToolsModelValidator.java | 231 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 279 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 438 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 487 |
"modelSourceFileConstraint", model.getIdentifier(), s.getIdentifier() ),
new ObjectFactory().createSourceFile( s ) ) );
if ( this.isValidateJava() )
{
for ( final TemplateParameterType p : s.getTemplateParameter() )
{
try
{
p.getJavaValue( context.getClassLoader() );
}
catch ( final ModelObjectException e )
{
final String message = getMessage( e );
if ( context.isLoggable( Level.FINE ) )
{
context.log( Level.FINE, message, e );
}
report.getDetails().add( new ModelValidationReport.Detail( | |
| File | Line |
|---|---|
| org/jomc/tools/modlet/ToolsModelValidator.java | 336 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 544 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 593 |
"modelSourceSectionConstraint", model.getIdentifier(), s.getName() ),
new ObjectFactory().createSourceSection( s ) ) );
if ( this.isValidateJava() )
{
for ( final TemplateParameterType p : s.getTemplateParameter() )
{
try
{
p.getJavaValue( context.getClassLoader() );
}
catch ( final ModelObjectException e )
{
final String message = getMessage( e );
if ( context.isLoggable( Level.FINE ) )
{
context.log( Level.FINE, message, e );
}
report.getDetails().add( new ModelValidationReport.Detail( | |
| File | Line |
|---|---|
| org/jomc/tools/modlet/ToolsModelValidator.java | 797 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 847 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 929 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 981 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 1042 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 1094 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 1168 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 1220 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 1281 |
| org/jomc/tools/modlet/ToolsModelValidator.java | 1333 |
s.getName() ), new org.jomc.model.ObjectFactory().createImplementation( implementation ) ) );
if ( this.isValidateJava() )
{
for ( final TemplateParameterType p : s.getTemplateParameter() )
{
try
{
p.getJavaValue( context.getClassLoader() );
}
catch ( final ModelObjectException e )
{
final String message = getMessage( e );
if ( context.isLoggable( Level.FINE ) )
{
context.log( Level.FINE, message, e );
}
report.getDetails().add( new ModelValidationReport.Detail( | |
| File | Line |
|---|---|
| org/jomc/tools/ClassFileProcessor.java | 2155 |
| org/jomc/tools/ClassFileProcessor.java | 2259 |
| org/jomc/tools/ClassFileProcessor.java | 2522 |
if ( specification.isClassDeclaration() && specification.getJavaTypeName() != null )
{
final String classLocation =
specification.getJavaTypeName().getClassName().replace( '.', File.separatorChar ) + ".class";
final File classFile = new File( classesDirectory, classLocation );
if ( !classesDirectory.isDirectory() )
{
throw new IOException( getMessage( "directoryNotFound", classesDirectory.getAbsolutePath() ) );
}
if ( !classFile.isFile() )
{
throw new IOException( getMessage( "fileNotFound", classFile.getAbsolutePath() ) );
}
if ( !( classFile.canRead() && classFile.canWrite() ) ) | |
| File | Line |
|---|---|
| org/jomc/tools/ClassFileProcessor.java | 2189 |
| org/jomc/tools/ClassFileProcessor.java | 2301 |
| org/jomc/tools/ClassFileProcessor.java | 2557 |
if ( implementation.isClassDeclaration() && implementation.getJavaTypeName() != null )
{
final String classLocation =
implementation.getJavaTypeName().getClassName().replace( '.', File.separatorChar ) + ".class";
final File classFile = new File( classesDirectory, classLocation );
if ( !classesDirectory.isDirectory() )
{
throw new IOException( getMessage( "directoryNotFound", classesDirectory.getAbsolutePath() ) );
}
if ( !classFile.isFile() )
{
throw new IOException( getMessage( "fileNotFound", classFile.getAbsolutePath() ) );
}
if ( !( classFile.canRead() && classFile.canWrite() ) ) | |
| File | Line |
|---|---|
| org/jomc/tools/model/SourceFileType.java | 928 |
| org/jomc/tools/model/SourceSectionType.java | 899 |
final SourceFileType clone = ((SourceFileType) super.clone());
// CClassInfo: org.jomc.tools.model.SourceSectionsType
clone.sourceSections = ((this.sourceSections == null)?null:((this.getSourceSections() == null)?null:this.getSourceSections().clone()));
// 'TemplateParameter' collection.
if (this.templateParameter!= null) {
clone.templateParameter = null;
copyTemplateParameter(this.getTemplateParameter(), clone.getTemplateParameter());
}
// 'Any' collection.
if (this.any!= null) {
clone.any = null;
copyAny(this.getAny(), clone.getAny());
}
// CBuiltinLeafInfo: java.lang.String
clone.identifier = ((this.identifier == null)?null:this.getIdentifier()); | |
| File | Line |
|---|---|
| org/jomc/tools/model/ToolsType.java | 177 |
| org/jomc/tools/model/ToolsType.java | 254 |
for ( int i = 0, s0 = any.size(); i < s0; i++ )
{
final Object o = any.get( i );
if ( o instanceof javax.xml.bind.JAXBElement<?> )
{
final javax.xml.bind.JAXBElement<?> e = (javax.xml.bind.JAXBElement<?>) o;
if ( namespaceURI.equals( e.getName().getNamespaceURI() )
&& localPart.equals( e.getName().getLocalPart() ) ) | |