Staging
v0.5.1
v0.5.1
swh:1:snp:508923e52305fedd5556b26d8042e0ec70598cef
AttributeContext.java
package org.pulloid;
import java.io.IOException;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
public class AttributeContext<T> extends NodeContext<T> {
protected AttributeContext(ElementContext<T> parent, String name) {
super(parent, name);
}
@Override
void hydrate(XmlPullParser p, Reflector<T> record) throws XmlPullParserException, IOException {
record.set(setter, p.getAttributeValue(null, name), transformer);
if(nextSibling != null)
nextSibling.hydrate(p, record);
}
}