gdxapp4d/gdxapp4d-lib-numberxd/src/main/java/love/distributedrebirth/numberxd/x4o/V072TongBindingHandler.java

47 lines
1.5 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package love.distributedrebirth.numberxd.x4o;
import org.x4o.xml.element.AbstractElementBindingHandler;
import org.x4o.xml.element.Element;
import org.x4o.xml.element.ElementBindingHandlerException;
import love.distributedrebirth.numberxd.base2t.part.T002ᖟ;
import love.distributedrebirth.numberxd.base2t.type.V072Tong;
import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAuthor注;
@DuytsDocAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
public class V072TongBindingHandler extends AbstractElementBindingHandler<V072Tong> {
@Override
public Class<?>[] getBindChildClasses() {
return new Class[] {V072TongP1.class, V072TongP2.class};
}
@Override
public Class<?> getBindParentClass() {
return V072Tong.class;
}
@Override
public void bindChild(Element childElement, V072Tong parent, Object childObject) throws ElementBindingHandlerException {
if (childObject instanceof V072TongP1) {
V072TongP1 p1 = (V072TongP1)childObject;
parent.setValue(T002ᖟ.PART_1, p1.theValue());
}
if (childObject instanceof V072TongP2) {
V072TongP2 p2 = (V072TongP2)childObject;
parent.setValue(T002ᖟ.PART_2, p2.theValue());
}
}
@Override
public void createChilderen(Element parentElement,V072Tong parent) throws ElementBindingHandlerException {
V072TongP1 p1 = new V072TongP1();
V072TongP2 p2 = new V072TongP2();
p1.setValue(parent.getValue(T002ᖟ.PART_1));
p2.setValue(parent.getValue(T002ᖟ.PART_2));
createChild(parentElement, p1);
createChild(parentElement, p2);
}
}