/** * Constructs a new ReplaceableItem object. Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param name * The name of the replaceable item. */ public ReplaceableItem(String name) { setName(name); }
/** * The name of the replaceable item. * * @param name * The name of the replaceable item. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplaceableItem withName(String name) { setName(name); return this; }
/** * Constructs a new ReplaceableItem object. Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param name * The name of the replaceable item. * @param attributes * The list of attributes for a replaceable item. */ public ReplaceableItem(String name, java.util.List<ReplaceableAttribute> attributes) { setName(name); setAttributes(attributes); }
public ReplaceableItem unmarshall(StaxUnmarshallerContext context) throws Exception { ReplaceableItem replaceableItem = new ReplaceableItem(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return replaceableItem; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("ItemName", targetDepth)) { replaceableItem.setName(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("Attribute", targetDepth)) { replaceableItem.withAttributes(ReplaceableAttributeStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return replaceableItem; } } } }
/** * Constructs a new ReplaceableItem object. * Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param name The name of the replaceable item. */ public ReplaceableItem(String name) { setName(name); }
/** * Constructs a new ReplaceableItem object. * Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param name The name of the replaceable item. * @param attributes The list of attributes for a replaceable item. */ public ReplaceableItem(String name, java.util.List<ReplaceableAttribute> attributes) { setName(name); setAttributes(attributes); }
/** * Constructs a new ReplaceableItem object. Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param name * The name of the replaceable item. */ public ReplaceableItem(String name) { setName(name); }
/** * The name of the replaceable item. * * @param name * The name of the replaceable item. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplaceableItem withName(String name) { setName(name); return this; }
/** * Constructs a new ReplaceableItem object. Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param name * The name of the replaceable item. * @param attributes * The list of attributes for a replaceable item. */ public ReplaceableItem(String name, java.util.List<ReplaceableAttribute> attributes) { setName(name); setAttributes(attributes); }
public ReplaceableItem unmarshall(StaxUnmarshallerContext context) throws Exception { ReplaceableItem replaceableItem = new ReplaceableItem(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return replaceableItem; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("ItemName", targetDepth)) { replaceableItem.setName(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("Attribute", targetDepth)) { replaceableItem.withAttributes(ReplaceableAttributeStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return replaceableItem; } } } }