/** * Gets the property name for this attribute. * * @return * always a non-null, valid string. */ public final String getPropertyName() { String r = DOMUtil.getAttribute(element,"property"); if(r!=null) return r; else return name(); } }
/** * When this element is an PCDATA-only content model, * returns the conversion for it. Otherwise the behavior is undefined. */ private TypeUse getConversion() { assert contentModel == Term.EMPTY; // this is PCDATA-only element BIElement e = owner.bindInfo.element(name); if(e!=null) { BIConversion conv = e.getConversion(); if(conv!=null) return conv.getTransducer(); } return CBuiltinLeafInfo.STRING; }
/** Adds all built-in conversions into the given map. */ static void addBuiltinConversions( BindInfo bi, Map<String,BIConversion> m ) { add( m, new BIUserConversion( bi, parse("<conversion name='boolean' type='java.lang.Boolean' parse='getBoolean' />"))); add( m, new BIUserConversion( bi, parse("<conversion name='byte' type='java.lang.Byte' parse='parseByte' />"))); add( m, new BIUserConversion( bi, parse("<conversion name='short' type='java.lang.Short' parse='parseShort' />"))); add( m, new BIUserConversion( bi, parse("<conversion name='int' type='java.lang.Integer' parse='parseInt' />"))); add( m, new BIUserConversion( bi, parse("<conversion name='long' type='java.lang.Long' parse='parseLong' />"))); add( m, new BIUserConversion( bi, parse("<conversion name='float' type='java.lang.Float' parse='parseFloat' />"))); add( m, new BIUserConversion( bi, parse("<conversion name='double' type='java.lang.Double' parse='parseDouble' />"))); }
/** Gets the value from the option element. */ private String getOption(String attName, String defaultValue) { Element opt = DOMUtil.getElement(dom,"options"); if (opt != null) { String s = DOMUtil.getAttribute(opt,attName); if (s != null) return s; } return defaultValue; }
BIInterface( Element e ) { this.dom = e; name = DOMUtil.getAttribute(e,"name"); members = parseTokens(DOMUtil.getAttribute(e,"members")); if(DOMUtil.getAttribute(e,"properties")!=null) { fields = parseTokens(DOMUtil.getAttribute(e,"properties")); throw new AssertionError("//interface/@properties is not supported"); } else // no property was specified fields = new String[0]; }
public void startElement(String namespace, String localName, String qName, Attributes attrs) { super.startElement(namespace, localName, qName, attrs); DOMLocator.setLocationInfo(getCurrentElement(),locator); } }
/** * Gets the source location where this element is declared. */ public Locator getLocation() { return DOMLocator.getLocationInfo(e); }
/** * When this element is an PCDATA-only content model, * returns the conversion for it. Otherwise the behavior is undefined. */ private TypeUse getConversion() { assert contentModel == Term.EMPTY; // this is PCDATA-only element BIElement e = owner.bindInfo.element(name); if(e!=null) { BIConversion conv = e.getConversion(); if(conv!=null) return conv.getTransducer(); } return CBuiltinLeafInfo.STRING; }
/** * Gets the property name for this attribute. * * @return * always a non-null, valid string. */ public final String getPropertyName() { String r = DOMUtil.getAttribute(element,"property"); if(r!=null) return r; else return name(); } }
/** Gets the value from the option element. */ private String getOption(String attName, String defaultValue) { Element opt = DOMUtil.getElement(dom,"options"); if (opt != null) { String s = DOMUtil.getAttribute(opt,attName); if (s != null) return s; } return defaultValue; }
BIInterface( Element e ) { this.dom = e; name = DOMUtil.getAttribute(e,"name"); members = parseTokens(DOMUtil.getAttribute(e,"members")); if(DOMUtil.getAttribute(e,"properties")!=null) { fields = parseTokens(DOMUtil.getAttribute(e,"properties")); throw new AssertionError("//interface/@properties is not supported"); } else // no property was specified fields = new String[0]; }
/** Gets the location where this declaration is declared. */ public Locator getSourceLocation() { return DOMLocator.getLocationInfo(e); } }
/** * When this element is an PCDATA-only content model, * returns the conversion for it. Otherwise the behavior is undefined. */ private TypeUse getConversion() { assert contentModel == Term.EMPTY; // this is PCDATA-only element BIElement e = owner.bindInfo.element(name); if(e!=null) { BIConversion conv = e.getConversion(); if(conv!=null) return conv.getTransducer(); } return CBuiltinLeafInfo.STRING; }
/** * Gets the property name for this attribute. * * @return * always a non-null, valid string. */ public final String getPropertyName() { String r = DOMUtil.getAttribute(element,"property"); if(r!=null) return r; else return name(); } }
/** * Gets the source location where this element is declared. */ public Locator getLocation() { return DOMLocator.getLocationInfo(e); }
/** * When this element is an PCDATA-only content model, * returns the conversion for it. Otherwise the behavior is undefined. */ private TypeUse getConversion() { assert contentModel == Term.EMPTY; // this is PCDATA-only element BIElement e = owner.bindInfo.element(name); if(e!=null) { BIConversion conv = e.getConversion(); if(conv!=null) return conv.getTransducer(); } return CBuiltinLeafInfo.STRING; }
/** * Gets the property name for this attribute. * * @return * always a non-null, valid string. */ public final String getPropertyName() { String r = DOMUtil.getAttribute(element,"property"); if(r!=null) return r; else return name(); } }
/** Gets the location where this declaration is declared. */ public Locator getSourceLocation() { return DOMLocator.getLocationInfo(e); } }
/** * When this element is an PCDATA-only content model, * returns the conversion for it. Otherwise the behavior is undefined. */ private TypeUse getConversion() { assert contentModel == Term.EMPTY; // this is PCDATA-only element BIElement e = owner.bindInfo.element(name); if(e!=null) { BIConversion conv = e.getConversion(); if(conv!=null) return conv.getTransducer(); } return CBuiltinLeafInfo.STRING; }
/** * Gets the property name for this attribute. * * @return * always a non-null, valid string. */ public final String getPropertyName() { String r = DOMUtil.getAttribute(element,"property"); if(r!=null) return r; else return name(); } }