public String assignClassName(CClassInfoParent parent, String className) { if (parent instanceof CClassInfoParent.Package) { CClassInfoParent.Package p = (CClassInfoParent.Package) parent; return assignClassName(p.pkg,className); } // not a package-level class return className; } }
/** * @param nc * Usually this should be set in the constructor, but we do allow this parameter * to be initially null, and then set later. * @param schemaComponent * The source schema model, if this is built from XSD. */ public Model( Options opts, JCodeModel cm, NameConverter nc, ClassNameAllocator allocator, XSSchemaSet schemaComponent ) { this.options = opts; this.codeModel = cm; this.nameConverter = nc; this.defaultSymbolSpace = new SymbolSpace(codeModel); defaultSymbolSpace.setType(codeModel.ref(Object.class)); elementMappings.put(null, new LinkedHashMap<QName, CElementInfo>()); if(opts.automaticNameConflictResolution) allocator = new AutoClassNameAllocator(allocator); this.allocator = new ClassNameAllocatorWrapper(allocator); this.schemaComponent = schemaComponent; this.globalCustomizations.setParent(this, this); }
/** * @param nc * Usually this should be set in the constructor, but we do allow this parameter * to be initially null, and then set later. * @param schemaComponent * The source schema model, if this is built from XSD. */ public Model( Options opts, JCodeModel cm, NameConverter nc, ClassNameAllocator allocator, XSSchemaSet schemaComponent ) { this.options = opts; this.codeModel = cm; this.nameConverter = nc; this.defaultSymbolSpace = new SymbolSpace(codeModel); defaultSymbolSpace.setType(codeModel.ref(Object.class)); elementMappings.put(null,new HashMap<QName,CElementInfo>()); if(opts.automaticNameConflictResolution) allocator = new AutoClassNameAllocator(allocator); this.allocator = new ClassNameAllocatorWrapper(allocator); this.schemaComponent = schemaComponent; this.gloablCustomizations.setParent(this,this); }
public String assignClassName(CClassInfoParent parent, String className) { if (parent instanceof CClassInfoParent.Package) { CClassInfoParent.Package p = (CClassInfoParent.Package) parent; return assignClassName(p.pkg,className); } // not a package-level class return className; } }
/** * @param nc * Usually this should be set in the constructor, but we do allow this parameter * to be initially null, and then set later. * @param schemaComponent * The source schema model, if this is built from XSD. */ public Model( Options opts, JCodeModel cm, NameConverter nc, ClassNameAllocator allocator, XSSchemaSet schemaComponent ) { this.options = opts; this.codeModel = cm; this.nameConverter = nc; this.defaultSymbolSpace = new SymbolSpace(codeModel); defaultSymbolSpace.setType(codeModel.ref(Object.class)); elementMappings.put(null, new LinkedHashMap<QName, CElementInfo>()); if(opts.automaticNameConflictResolution) allocator = new AutoClassNameAllocator(allocator); this.allocator = new ClassNameAllocatorWrapper(allocator); this.schemaComponent = schemaComponent; this.globalCustomizations.setParent(this, this); }
public String assignClassName(CClassInfoParent parent, String className) { if (parent instanceof CClassInfoParent.Package) { CClassInfoParent.Package p = (CClassInfoParent.Package) parent; return assignClassName(p.pkg,className); } // not a package-level class return className; } }
/** * @param nc * Usually this should be set in the constructor, but we do allow this parameter * to be initially null, and then set later. * @param schemaComponent * The source schema model, if this is built from XSD. */ public Model( Options opts, JCodeModel cm, NameConverter nc, ClassNameAllocator allocator, XSSchemaSet schemaComponent ) { this.options = opts; this.codeModel = cm; this.nameConverter = nc; this.defaultSymbolSpace = new SymbolSpace(codeModel); defaultSymbolSpace.setType(codeModel.ref(Object.class)); elementMappings.put(null,new HashMap<QName,CElementInfo>()); if(opts.automaticNameConflictResolution) allocator = new AutoClassNameAllocator(allocator); this.allocator = new ClassNameAllocatorWrapper(allocator); this.schemaComponent = schemaComponent; this.gloablCustomizations.setParent(this,this); }
public String assignClassName(CClassInfoParent parent, String className) { if (parent instanceof CClassInfoParent.Package) { CClassInfoParent.Package p = (CClassInfoParent.Package) parent; return assignClassName(p.pkg,className); } // not a package-level class return className; } }
/** * @param nc * Usually this should be set in the constructor, but we do allow this parameter * to be initially null, and then set later. * @param schemaComponent * The source schema model, if this is built from XSD. */ public Model( Options opts, JCodeModel cm, NameConverter nc, ClassNameAllocator allocator, XSSchemaSet schemaComponent ) { this.options = opts; this.codeModel = cm; this.nameConverter = nc; this.defaultSymbolSpace = new SymbolSpace(codeModel); defaultSymbolSpace.setType(codeModel.ref(Object.class)); elementMappings.put(null, new LinkedHashMap<QName, CElementInfo>()); if(opts.automaticNameConflictResolution) allocator = new AutoClassNameAllocator(allocator); this.allocator = new ClassNameAllocatorWrapper(allocator); this.schemaComponent = schemaComponent; this.globalCustomizations.setParent(this, this); }
public String assignClassName(CClassInfoParent parent, String className) { if (parent instanceof CClassInfoParent.Package) { CClassInfoParent.Package p = (CClassInfoParent.Package) parent; return assignClassName(p.pkg,className); } // not a package-level class return className; } }
public CClassInfo(Model model,JCodeModel cm, String fullName, Locator location, QName typeName, QName elementName, XSComponent source, CCustomizations customizations) { super(model,source,location,customizations); this.model = model; int idx = fullName.indexOf('.'); if(idx<0) { this.parent = model.getPackage(cm.rootPackage()); this.shortName = model.allocator.assignClassName(parent,fullName); } else { this.parent = model.getPackage(cm._package(fullName.substring(0,idx))); this.shortName = model.allocator.assignClassName(parent,fullName.substring(idx+1)); } this.typeName = typeName; this.elementName = elementName; model.add(this); }
public CClassInfo(Model model,JCodeModel cm, String fullName, Locator location, QName typeName, QName elementName, XSComponent source, CCustomizations customizations) { super(model,source,location,customizations); this.model = model; int idx = fullName.indexOf('.'); if(idx<0) { this.parent = model.getPackage(cm.rootPackage()); this.shortName = model.allocator.assignClassName(parent,fullName); } else { this.parent = model.getPackage(cm._package(fullName.substring(0,idx))); this.shortName = model.allocator.assignClassName(parent,fullName.substring(idx+1)); } this.typeName = typeName; this.elementName = elementName; model.add(this); }
public CClassInfo(Model model,JCodeModel cm, String fullName, Locator location, QName typeName, QName elementName, XSComponent source, CCustomizations customizations) { super(model,source,location,customizations); this.model = model; int idx = fullName.indexOf('.'); if(idx<0) { this.parent = model.getPackage(cm.rootPackage()); this.shortName = model.allocator.assignClassName(parent,fullName); } else { this.parent = model.getPackage(cm._package(fullName.substring(0,idx))); this.shortName = model.allocator.assignClassName(parent,fullName.substring(idx+1)); } this.typeName = typeName; this.elementName = elementName; model.add(this); }
public CClassInfo(Model model,JCodeModel cm, String fullName, Locator location, QName typeName, QName elementName, XSComponent source, CCustomizations customizations) { super(model,source,location,customizations); this.model = model; int idx = fullName.indexOf('.'); if(idx<0) { this.parent = model.getPackage(cm.rootPackage()); this.shortName = model.allocator.assignClassName(parent,fullName); } else { this.parent = model.getPackage(cm._package(fullName.substring(0,idx))); this.shortName = model.allocator.assignClassName(parent,fullName.substring(idx+1)); } this.typeName = typeName; this.elementName = elementName; model.add(this); }
public CClassInfo(Model model,JCodeModel cm, String fullName, Locator location, QName typeName, QName elementName, XSComponent source, CCustomizations customizations) { super(model,source,location,customizations); this.model = model; int idx = fullName.indexOf('.'); if(idx<0) { this.parent = model.getPackage(cm.rootPackage()); this.shortName = model.allocator.assignClassName(parent,fullName); } else { this.parent = model.getPackage(cm._package(fullName.substring(0,idx))); this.shortName = model.allocator.assignClassName(parent,fullName.substring(idx+1)); } this.typeName = typeName; this.elementName = elementName; model.add(this); }
public CEnumLeafInfo(Model model, QName typeName, CClassInfoParent container, String shortName, CNonElement base, Collection<CEnumConstant> _members, XSComponent source, CCustomizations customizations, Locator _sourceLocator) { this.model = model; this.parent = container; this.shortName = model.allocator.assignClassName(parent,shortName); this.base = base; this.members = _members; this.source = source; if(customizations==null) customizations = CCustomizations.EMPTY; this.customizations = customizations; this.sourceLocator = _sourceLocator; this.typeName = typeName; for( CEnumConstant mem : members ) mem.setParent(this); model.add(this); // TODO: can we take advantage of the fact that enum can be XmlRootElement? }
public CEnumLeafInfo(Model model, QName typeName, CClassInfoParent container, String shortName, CNonElement base, Collection<CEnumConstant> _members, XSComponent source, CCustomizations customizations, Locator _sourceLocator) { this.model = model; this.parent = container; this.shortName = model.allocator.assignClassName(parent,shortName); this.base = base; this.members = _members; this.source = source; if(customizations==null) customizations = CCustomizations.EMPTY; this.customizations = customizations; this.sourceLocator = _sourceLocator; this.typeName = typeName; for( CEnumConstant mem : members ) mem.setParent(this); model.add(this); // TODO: can we take advantage of the fact that enum can be XmlRootElement? }
public CEnumLeafInfo(Model model, QName typeName, CClassInfoParent container, String shortName, CNonElement base, Collection<CEnumConstant> _members, XSComponent source, CCustomizations customizations, Locator _sourceLocator) { this.model = model; this.parent = container; this.shortName = model.allocator.assignClassName(parent,shortName); this.base = base; this.members = _members; this.source = source; if(customizations==null) customizations = CCustomizations.EMPTY; this.customizations = customizations; this.sourceLocator = _sourceLocator; this.typeName = typeName; for( CEnumConstant mem : members ) mem.setParent(this); model.add(this); // TODO: can we take advantage of the fact that enum can be XmlRootElement? }
public CEnumLeafInfo(Model model, QName typeName, CClassInfoParent container, String shortName, CNonElement base, Collection<CEnumConstant> _members, XSComponent source, CCustomizations customizations, Locator _sourceLocator) { this.model = model; this.parent = container; this.shortName = model.allocator.assignClassName(parent,shortName); this.base = base; this.members = _members; this.source = source; if(customizations==null) customizations = CCustomizations.EMPTY; this.customizations = customizations; this.sourceLocator = _sourceLocator; this.typeName = typeName; for( CEnumConstant mem : members ) mem.setParent(this); model.add(this); // TODO: can we take advantage of the fact that enum can be XmlRootElement? }
public CEnumLeafInfo(Model model, QName typeName, CClassInfoParent container, String shortName, CNonElement base, Collection<CEnumConstant> _members, XSComponent source, CCustomizations customizations, Locator _sourceLocator) { this.model = model; this.parent = container; this.shortName = model.allocator.assignClassName(parent,shortName); this.base = base; this.members = _members; this.source = source; if(customizations==null) customizations = CCustomizations.EMPTY; this.customizations = customizations; this.sourceLocator = _sourceLocator; this.typeName = typeName; for( CEnumConstant mem : members ) mem.setParent(this); model.add(this); // TODO: can we take advantage of the fact that enum can be XmlRootElement? }