XSClass xsClass = new XSClass(jClass, typeName);
boolean derived = false;
    public JClass createSourceCode        (SimpleType simpleType, SGStateInfo sgState)    {        if ( SimpleTypesFactory.isBuiltInType( simpleType.getTypeCode() ) ) {            String err = "You cannot construct a ClassInfo for a " +                "built-in SimpleType.";            throw new IllegalArgumentException(err);        }                if (sgState == null) {            throw new IllegalArgumentException("SGStateInfo cannot be null.");        }        boolean enumeration = false;        //-- class name information        String typeName = simpleType.getName();        if (typeName == null) {            Structure struct = simpleType.getParent();            switch (struct.getStructureType()) {                case Structure.ATTRIBUTE:                    typeName = ((AttributeDecl)struct).getName();                    break;                case Structure.ELEMENT:                    typeName = ((ElementDecl)struct).getName();                    break;            }            typeName += "Type";        }        String className   = JavaNaming.toJavaClassName(typeName);        String packageName = sgState.packageName;        if (simpleType.hasFacet(Facet.ENUMERATION)) {            enumeration = true;            //-- XXXX Fix packageName...this is a hack I know,            //-- XXXX we should change this            if ((packageName != null) && (packageName.length() > 0))                packageName = packageName + ".types";            else                packageName = "types";        }        className = resolveClassName(className, packageName);        FactoryState state = new FactoryState(className, sgState);        //-- reset package name        state.packageName = packageName;        ClassInfo classInfo = state.classInfo;        JClass    jClass    = state.jClass;        initialize(jClass);        //-- XML information        Schema  schema = simpleType.getSchema();        classInfo.setNamespaceURI(schema.getTargetNamespace());        classInfo.setNodeName(typeName);        //-- process annotation        String comment  = processAnnotations(simpleType);        if (comment != null)            jClass.getJDocComment().setComment(comment);        XSClass xsClass = new XSClass(jClass, typeName);        classInfo.setSchemaType(xsClass);        //-- handle enumerated types        if (enumeration) {            xsClass.setAsEnumertated(true);            processEnumeration(simpleType, state);        }		//-- create Bound Properties code		if (state.hasBoundProperties())		    createPropertyChangeMethods(jClass);        sgState.bindReference(jClass, classInfo);        sgState.bindReference(simpleType, classInfo);        return jClass;    } //-- createSourceCode(SimpleType);