Staging
v0.5.0
https://repo1.maven.org/maven2/org/pulloid/pulloid
Raw File
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);
	}

}
back to top