public TypeUse getTypeUse(XSSimpleType owner) {
            if(typeUse!=null)
                return typeUse;
            JCodeModel cm = getCodeModel();
            JDefinedClass a;
            try {
                a = cm._class(adapter);
                a.hide();   // we assume this is given by the user
                a._extends(cm.ref(XmlAdapter.class).narrow(String.class).narrow(
                        cm.ref(type)));
            } catch (JClassAlreadyExistsException e) {
                a = e.getExistingClass();
            }
            // TODO: it's not correct to say that it adapts from String,
            // but OTOH I don't think we can compute that.
            typeUse = TypeUseFactory.adapt(
                    CBuiltinLeafInfo.STRING,
                    new CAdapter(a));
            return typeUse;
        }
public TypeUse getTypeUse(XSSimpleType owner) {
            if(typeUse!=null)
                return typeUse;
            JCodeModel cm = getCodeModel();
            JDefinedClass a;
            try {
                a = cm._class(adapter);
                a.hide();  
                a._extends(cm.ref(XmlAdapter.class).narrow(String.class).narrow(
                        cm.ref(type)));
            } catch (JClassAlreadyExistsException e) {
                a = e.getExistingClass();
            }
           
           
            typeUse = TypeUseFactory.adapt(
                    CBuiltinLeafInfo.STRING,
                    new CAdapter(a));
            return typeUse;
        }
public typeuse gettypeuse(xssimpletype owner) { if(typeuse!=null) return typeuse; jcodemodel cm = getcodemodel(); jdefinedclass a; try { a = cm._class(adapter); a.hide(); a._extends(cm.ref(xmladapter.class).narrow(string.class).narrow( cm.ref(type))); } catch (jclassalreadyexistsexception e) { a = e.getexistingclass(); } typeuse = typeusefactory.adapt( cbuiltinleafinfo.string, new cadapter(a)); return typeuse; }