+ /**
+ * calls the castor-generated hashCode() method
+ * @return
+ */
+ protected int __callHash() {
+ try {
+ Method fd = this.getClass().getMethod("hashCode", (Class[]) null);
+ Object hashvalue = fd.invoke((Object) this, (Object[]) null);
+ if (log.isDebugEnabled())
+ log.debug(this.getClass().getName()+" called hashCode()!");
+ if (hashvalue!=null && hashvalue instanceof Integer) {
+ return ((Integer) hashvalue).intValue();
+ }
+ } catch (InvocationTargetException e) {
+ log.error("SourceGeneration of "
+ + this.getClass().toString()
+ + "\n has resulted in an inaccessible 'hashCode' method!\nHave you set org.exolab.castor.builder.equalsmethod=true in castorbuilder.properties ?.", e);
+ }
+ catch (IllegalAccessException e) {
+ log.error("SourceGeneration of "
+ + this.getClass().toString()
+ + "\n has resulted in an inaccessible 'hashCode' method!\nHave you set org.exolab.castor.builder.equalsmethod=true in castorbuilder.properties ?.", e);
+ } catch (SecurityException e) {
+ log.error("Security access violation for "+this.getClass().toString(),e);
+ } catch (NoSuchMethodException e) {
+ log.warn(this.getClass().toString()+" was erroneously extending from a Vorba Vobject class (Implementation error? no hashCode() method)" +
+ "\nHave you set org.exolab.castor.builder.equalsmethod=true in castorbuilder.properties ?.", e);
+ }
+ return 0;
+ }