Java Code Examples for com.sun.tools.internal.xjc.reader.Ring#add()

The following examples show how to use com.sun.tools.internal.xjc.reader.Ring#add() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BGMBuilder.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Entry point.
 */
public static Model build( XSSchemaSet _schemas, JCodeModel codeModel,
        ErrorReceiver _errorReceiver, Options opts ) {
    // set up a ring
    final Ring old = Ring.begin();
    try {
        ErrorReceiverFilter ef = new ErrorReceiverFilter(_errorReceiver);

        Ring.add(XSSchemaSet.class,_schemas);
        Ring.add(codeModel);
        Model model = new Model(opts, codeModel, null/*set later*/, opts.classNameAllocator, _schemas);
        Ring.add(model);
        Ring.add(ErrorReceiver.class,ef);
        Ring.add(CodeModelClassFactory.class,new CodeModelClassFactory(ef));

        BGMBuilder builder = new BGMBuilder(opts.defaultPackage,opts.defaultPackage2,
            opts.isExtensionMode(),opts.getFieldRendererFactory(), opts.activePlugins);
        builder._build();

        if(ef.hadError())   return null;
        else                return model;
    } finally {
        Ring.end(old);
    }
}
 
Example 2
Source File: BGMBuilder.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Entry point.
 */
public static Model build( XSSchemaSet _schemas, JCodeModel codeModel,
        ErrorReceiver _errorReceiver, Options opts ) {
    // set up a ring
    final Ring old = Ring.begin();
    try {
        ErrorReceiverFilter ef = new ErrorReceiverFilter(_errorReceiver);

        Ring.add(XSSchemaSet.class,_schemas);
        Ring.add(codeModel);
        Model model = new Model(opts, codeModel, null/*set later*/, opts.classNameAllocator, _schemas);
        Ring.add(model);
        Ring.add(ErrorReceiver.class,ef);
        Ring.add(CodeModelClassFactory.class,new CodeModelClassFactory(ef));

        BGMBuilder builder = new BGMBuilder(opts.defaultPackage,opts.defaultPackage2,
            opts.isExtensionMode(),opts.getFieldRendererFactory(), opts.activePlugins);
        builder._build();

        if(ef.hadError())   return null;
        else                return model;
    } finally {
        Ring.end(old);
    }
}
 
Example 3
Source File: BGMBuilder.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Entry point.
 */
public static Model build( XSSchemaSet _schemas, JCodeModel codeModel,
        ErrorReceiver _errorReceiver, Options opts ) {
    // set up a ring
    final Ring old = Ring.begin();
    try {
        ErrorReceiverFilter ef = new ErrorReceiverFilter(_errorReceiver);

        Ring.add(XSSchemaSet.class,_schemas);
        Ring.add(codeModel);
        Model model = new Model(opts, codeModel, null/*set later*/, opts.classNameAllocator, _schemas);
        Ring.add(model);
        Ring.add(ErrorReceiver.class,ef);
        Ring.add(CodeModelClassFactory.class,new CodeModelClassFactory(ef));

        BGMBuilder builder = new BGMBuilder(opts.defaultPackage,opts.defaultPackage2,
            opts.isExtensionMode(),opts.getFieldRendererFactory(), opts.activePlugins);
        builder._build();

        if(ef.hadError())   return null;
        else                return model;
    } finally {
        Ring.end(old);
    }
}
 
Example 4
Source File: BGMBuilder.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Entry point.
 */
public static Model build( XSSchemaSet _schemas, JCodeModel codeModel,
        ErrorReceiver _errorReceiver, Options opts ) {
    // set up a ring
    final Ring old = Ring.begin();
    try {
        ErrorReceiverFilter ef = new ErrorReceiverFilter(_errorReceiver);

        Ring.add(XSSchemaSet.class,_schemas);
        Ring.add(codeModel);
        Model model = new Model(opts, codeModel, null/*set later*/, opts.classNameAllocator, _schemas);
        Ring.add(model);
        Ring.add(ErrorReceiver.class,ef);
        Ring.add(CodeModelClassFactory.class,new CodeModelClassFactory(ef));

        BGMBuilder builder = new BGMBuilder(opts.defaultPackage,opts.defaultPackage2,
            opts.isExtensionMode(),opts.getFieldRendererFactory(), opts.activePlugins);
        builder._build();

        if(ef.hadError())   return null;
        else                return model;
    } finally {
        Ring.end(old);
    }
}
 
Example 5
Source File: BGMBuilder.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Entry point.
 */
public static Model build( XSSchemaSet _schemas, JCodeModel codeModel,
        ErrorReceiver _errorReceiver, Options opts ) {
    // set up a ring
    final Ring old = Ring.begin();
    try {
        ErrorReceiverFilter ef = new ErrorReceiverFilter(_errorReceiver);

        Ring.add(XSSchemaSet.class,_schemas);
        Ring.add(codeModel);
        Model model = new Model(opts, codeModel, null/*set later*/, opts.classNameAllocator, _schemas);
        Ring.add(model);
        Ring.add(ErrorReceiver.class,ef);
        Ring.add(CodeModelClassFactory.class,new CodeModelClassFactory(ef));

        BGMBuilder builder = new BGMBuilder(opts.defaultPackage,opts.defaultPackage2,
            opts.isExtensionMode(),opts.getFieldRendererFactory(), opts.activePlugins);
        builder._build();

        if(ef.hadError())   return null;
        else                return model;
    } finally {
        Ring.end(old);
    }
}
 
Example 6
Source File: BGMBuilder.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Entry point.
 */
public static Model build( XSSchemaSet _schemas, JCodeModel codeModel,
        ErrorReceiver _errorReceiver, Options opts ) {
    // set up a ring
    final Ring old = Ring.begin();
    try {
        ErrorReceiverFilter ef = new ErrorReceiverFilter(_errorReceiver);

        Ring.add(XSSchemaSet.class,_schemas);
        Ring.add(codeModel);
        Model model = new Model(opts, codeModel, null/*set later*/, opts.classNameAllocator, _schemas);
        Ring.add(model);
        Ring.add(ErrorReceiver.class,ef);
        Ring.add(CodeModelClassFactory.class,new CodeModelClassFactory(ef));

        BGMBuilder builder = new BGMBuilder(opts.defaultPackage,opts.defaultPackage2,
            opts.isExtensionMode(),opts.getFieldRendererFactory(), opts.activePlugins);
        builder._build();

        if(ef.hadError())   return null;
        else                return model;
    } finally {
        Ring.end(old);
    }
}
 
Example 7
Source File: ClassSelector.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public ClassSelector() {
    classBinder = new Abstractifier(new DefaultClassBinder());
    Ring.add(ClassBinder.class,classBinder);

    classScopes.push(null);  // so that the getClassFactory method returns null

    XSComplexType anyType = Ring.get(XSSchemaSet.class).getComplexType(WellKnownNamespace.XML_SCHEMA,"anyType");
    bindMap.put(anyType,new Binding(anyType,CBuiltinLeafInfo.ANYTYPE));
}
 
Example 8
Source File: ClassSelector.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public ClassSelector() {
    classBinder = new Abstractifier(new DefaultClassBinder());
    Ring.add(ClassBinder.class,classBinder);

    classScopes.push(null);  // so that the getClassFactory method returns null

    XSComplexType anyType = Ring.get(XSSchemaSet.class).getComplexType(WellKnownNamespace.XML_SCHEMA,"anyType");
    bindMap.put(anyType,new Binding(anyType,CBuiltinLeafInfo.ANYTYPE));
}
 
Example 9
Source File: ClassSelector.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public ClassSelector() {
    classBinder = new Abstractifier(new DefaultClassBinder());
    Ring.add(ClassBinder.class,classBinder);

    classScopes.push(null);  // so that the getClassFactory method returns null

    XSComplexType anyType = Ring.get(XSSchemaSet.class).getComplexType(WellKnownNamespace.XML_SCHEMA,"anyType");
    bindMap.put(anyType,new Binding(anyType,CBuiltinLeafInfo.ANYTYPE));
}
 
Example 10
Source File: ClassSelector.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public ClassSelector() {
    classBinder = new Abstractifier(new DefaultClassBinder());
    Ring.add(ClassBinder.class,classBinder);

    classScopes.push(null);  // so that the getClassFactory method returns null

    XSComplexType anyType = Ring.get(XSSchemaSet.class).getComplexType(WellKnownNamespace.XML_SCHEMA,"anyType");
    bindMap.put(anyType,new Binding(anyType,CBuiltinLeafInfo.ANYTYPE));
}
 
Example 11
Source File: ClassSelector.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public ClassSelector() {
    classBinder = new Abstractifier(new DefaultClassBinder());
    Ring.add(ClassBinder.class,classBinder);

    classScopes.push(null);  // so that the getClassFactory method returns null

    XSComplexType anyType = Ring.get(XSSchemaSet.class).getComplexType(WellKnownNamespace.XML_SCHEMA,"anyType");
    bindMap.put(anyType,new Binding(anyType,CBuiltinLeafInfo.ANYTYPE));
}
 
Example 12
Source File: ParticleBinder.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
protected ParticleBinder() {
    // make sure that this object is available as ParticleBinder, not as their actual implementation classes
    Ring.add(ParticleBinder.class,this);
}
 
Example 13
Source File: BindingComponent.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
protected BindingComponent() {
    Ring.add(this);
}
 
Example 14
Source File: ParticleBinder.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
protected ParticleBinder() {
    // make sure that this object is available as ParticleBinder, not as their actual implementation classes
    Ring.add(ParticleBinder.class,this);
}
 
Example 15
Source File: BindingComponent.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
protected BindingComponent() {
    Ring.add(this);
}
 
Example 16
Source File: BindingComponent.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
protected BindingComponent() {
    Ring.add(this);
}
 
Example 17
Source File: ParticleBinder.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
protected ParticleBinder() {
    // make sure that this object is available as ParticleBinder, not as their actual implementation classes
    Ring.add(ParticleBinder.class,this);
}
 
Example 18
Source File: BindingComponent.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
protected BindingComponent() {
    Ring.add(this);
}
 
Example 19
Source File: ParticleBinder.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
protected ParticleBinder() {
    // make sure that this object is available as ParticleBinder, not as their actual implementation classes
    Ring.add(ParticleBinder.class,this);
}
 
Example 20
Source File: BindingComponent.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
protected BindingComponent() {
    Ring.add(this);
}