/** * Gets the type of this property, if any. * <p> * {@code <element-ref>} particle doesn't have the type. * * @return * null if none is specified. */ public final JClass getType() { try { String type = DOMUtil.getAttribute(element,"supertype"); if(type==null) return null; // TODO: does this attribute defaults to the current package? int idx = type.lastIndexOf('.'); if(idx<0) return parent.parent.codeModel.ref(type); else return parent.parent.getTargetPackage().ref(type); } catch( ClassNotFoundException e ) { // TODO: better error handling throw new NoClassDefFoundError(e.getMessage()); } }
/** * Gets the type of this property, if any. * <p> * <element-ref> particle doesn't have the type. * * @return * null if none is specified. */ public final JClass getType() { try { String type = DOMUtil.getAttribute(element,"supertype"); if(type==null) return null; // TODO: does this attribute defaults to the current package? int idx = type.lastIndexOf('.'); if(idx<0) return parent.parent.codeModel.ref(type); else return parent.parent.getTargetPackage().ref(type); } catch( ClassNotFoundException e ) { // TODO: better error handling throw new NoClassDefFoundError(e.getMessage()); } }
/** * Gets the type of this property, if any. * <p> * {@code <element-ref>} particle doesn't have the type. * * @return * null if none is specified. */ public final JClass getType() { try { String type = DOMUtil.getAttribute(element,"supertype"); if(type==null) return null; // TODO: does this attribute defaults to the current package? int idx = type.lastIndexOf('.'); if(idx<0) return parent.parent.codeModel.ref(type); else return parent.parent.getTargetPackage().ref(type); } catch( ClassNotFoundException e ) { // TODO: better error handling throw new NoClassDefFoundError(e.getMessage()); } }
/** * Gets the type of this property, if any. * <p> * <element-ref> particle doesn't have the type. * * @return * null if none is specified. */ public final JClass getType() { try { String type = DOMUtil.getAttribute(element,"supertype"); if(type==null) return null; // TODO: does this attribute defaults to the current package? int idx = type.lastIndexOf('.'); if(idx<0) return parent.parent.codeModel.ref(type); else return parent.parent.getTargetPackage().ref(type); } catch( ClassNotFoundException e ) { // TODO: better error handling throw new NoClassDefFoundError(e.getMessage()); } }
/** * Gets the type of this property, if any. * <p> * {@code <element-ref>} particle doesn't have the type. * * @return * null if none is specified. */ public final JClass getType() { try { String type = DOMUtil.getAttribute(element,"supertype"); if(type==null) return null; // TODO: does this attribute defaults to the current package? int idx = type.lastIndexOf('.'); if(idx<0) return parent.parent.codeModel.ref(type); else return parent.parent.getTargetPackage().ref(type); } catch( ClassNotFoundException e ) { // TODO: better error handling throw new NoClassDefFoundError(e.getMessage()); } }