XSParticleImpl p;
if (pParticle instanceof XsEAny) {
XsEAny any = (XsEAny) pParticle;
occurs = any;
XSAny wildcard = getXSSchema().getXSObjectFactory().newXSAny(this, any);
wildcard.validate();
p = new XSParticleImpl(wildcard);
} else if (pParticle instanceof XsEChoice) {
XsEChoice choice = (XsEChoice) pParticle;
occurs = choice;
XSGroup group = getXSSchema().getXSObjectFactory().newXSGroup(this, choice);