Java Code Examples for com.sun.codemodel.internal.JClass#narrow()

The following examples show how to use com.sun.codemodel.internal.JClass#narrow() . 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: UntypedListField.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @param coreList
 *      A concrete class that implements the List interface.
 *      An instance of this class will be used to store data
 *      for this field.
 */
protected UntypedListField(ClassOutlineImpl context, CPropertyInfo prop, JClass coreList) {
    // the JAXB runtime picks ArrayList if the signature is List,
    // so don't do eager allocation if it's ArrayList.
    // otherwise we need to do eager allocation so that the collection type specified by the user
    // will be used.
    super(context, prop, !coreList.fullName().equals("java.util.ArrayList"));
    this.coreList = coreList.narrow(exposedType.boxify());
    generate();
}
 
Example 2
Source File: UntypedListField.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @param coreList
 *      A concrete class that implements the List interface.
 *      An instance of this class will be used to store data
 *      for this field.
 */
protected UntypedListField(ClassOutlineImpl context, CPropertyInfo prop, JClass coreList) {
    // the JAXB runtime picks ArrayList if the signature is List,
    // so don't do eager allocation if it's ArrayList.
    // otherwise we need to do eager allocation so that the collection type specified by the user
    // will be used.
    super(context, prop, !coreList.fullName().equals("java.util.ArrayList"));
    this.coreList = coreList.narrow(exposedType.boxify());
    generate();
}
 
Example 3
Source File: DummyListField.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @param coreList
 *      A concrete class that implements the List interface.
 *      An instance of this class will be used to store data
 *      for this field.
 */
protected DummyListField(ClassOutlineImpl context, CPropertyInfo prop, JClass coreList) {
    // the JAXB runtime picks ArrayList if the signature is List,
    // so don't do eager allocation if it's ArrayList.
    // otherwise we need to do eager allocation so that the collection type specified by the user
    // will be used.
    super(context, prop, !coreList.fullName().equals("java.util.ArrayList"));
    this.coreList = coreList.narrow(exposedType.boxify());
    generate();
}
 
Example 4
Source File: NParameterizedType.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public JClass toType(Outline o, Aspect aspect) {
    JClass r = rawType.toType(o,aspect);

    for( NType arg : args )
        r = r.narrow(arg.toType(o,aspect).boxify());

    return r;
}
 
Example 5
Source File: NParameterizedType.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public JClass toType(Outline o, Aspect aspect) {
    JClass r = rawType.toType(o,aspect);

    for( NType arg : args )
        r = r.narrow(arg.toType(o,aspect).boxify());

    return r;
}
 
Example 6
Source File: DummyListField.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @param coreList
 *      A concrete class that implements the List interface.
 *      An instance of this class will be used to store data
 *      for this field.
 */
protected DummyListField(ClassOutlineImpl context, CPropertyInfo prop, JClass coreList) {
    // the JAXB runtime picks ArrayList if the signature is List,
    // so don't do eager allocation if it's ArrayList.
    // otherwise we need to do eager allocation so that the collection type specified by the user
    // will be used.
    super(context, prop, !coreList.fullName().equals("java.util.ArrayList"));
    this.coreList = coreList.narrow(exposedType.boxify());
    generate();
}
 
Example 7
Source File: NParameterizedType.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public JClass toType(Outline o, Aspect aspect) {
    JClass r = rawType.toType(o,aspect);

    for( NType arg : args )
        r = r.narrow(arg.toType(o,aspect).boxify());

    return r;
}
 
Example 8
Source File: UntypedListField.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @param coreList
 *      A concrete class that implements the List interface.
 *      An instance of this class will be used to store data
 *      for this field.
 */
protected UntypedListField(ClassOutlineImpl context, CPropertyInfo prop, JClass coreList) {
    // the JAXB runtime picks ArrayList if the signature is List,
    // so don't do eager allocation if it's ArrayList.
    // otherwise we need to do eager allocation so that the collection type specified by the user
    // will be used.
    super(context, prop, !coreList.fullName().equals("java.util.ArrayList"));
    this.coreList = coreList.narrow(exposedType.boxify());
    generate();
}
 
Example 9
Source File: DummyListField.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @param coreList
 *      A concrete class that implements the List interface.
 *      An instance of this class will be used to store data
 *      for this field.
 */
protected DummyListField(ClassOutlineImpl context, CPropertyInfo prop, JClass coreList) {
    // the JAXB runtime picks ArrayList if the signature is List,
    // so don't do eager allocation if it's ArrayList.
    // otherwise we need to do eager allocation so that the collection type specified by the user
    // will be used.
    super(context, prop, !coreList.fullName().equals("java.util.ArrayList"));
    this.coreList = coreList.narrow(exposedType.boxify());
    generate();
}
 
Example 10
Source File: NParameterizedType.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public JClass toType(Outline o, Aspect aspect) {
    JClass r = rawType.toType(o,aspect);

    for( NType arg : args )
        r = r.narrow(arg.toType(o,aspect).boxify());

    return r;
}
 
Example 11
Source File: DummyListField.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @param coreList
 *      A concrete class that implements the List interface.
 *      An instance of this class will be used to store data
 *      for this field.
 */
protected DummyListField(ClassOutlineImpl context, CPropertyInfo prop, JClass coreList) {
    // the JAXB runtime picks ArrayList if the signature is List,
    // so don't do eager allocation if it's ArrayList.
    // otherwise we need to do eager allocation so that the collection type specified by the user
    // will be used.
    super(context, prop, !coreList.fullName().equals("java.util.ArrayList"));
    this.coreList = coreList.narrow(exposedType.boxify());
    generate();
}
 
Example 12
Source File: UntypedListField.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @param coreList
 *      A concrete class that implements the List interface.
 *      An instance of this class will be used to store data
 *      for this field.
 */
protected UntypedListField(ClassOutlineImpl context, CPropertyInfo prop, JClass coreList) {
    // the JAXB runtime picks ArrayList if the signature is List,
    // so don't do eager allocation if it's ArrayList.
    // otherwise we need to do eager allocation so that the collection type specified by the user
    // will be used.
    super(context, prop, !coreList.fullName().equals("java.util.ArrayList"));
    this.coreList = coreList.narrow(exposedType.boxify());
    generate();
}
 
Example 13
Source File: NParameterizedType.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public JClass toType(Outline o, Aspect aspect) {
    JClass r = rawType.toType(o,aspect);

    for( NType arg : args )
        r = r.narrow(arg.toType(o,aspect).boxify());

    return r;
}
 
Example 14
Source File: UntypedListField.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @param coreList
 *      A concrete class that implements the List interface.
 *      An instance of this class will be used to store data
 *      for this field.
 */
protected UntypedListField(ClassOutlineImpl context, CPropertyInfo prop, JClass coreList) {
    // the JAXB runtime picks ArrayList if the signature is List,
    // so don't do eager allocation if it's ArrayList.
    // otherwise we need to do eager allocation so that the collection type specified by the user
    // will be used.
    super(context, prop, !coreList.fullName().equals("java.util.ArrayList"));
    this.coreList = coreList.narrow(exposedType.boxify());
    generate();
}
 
Example 15
Source File: DummyListField.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @param coreList
 *      A concrete class that implements the List interface.
 *      An instance of this class will be used to store data
 *      for this field.
 */
protected DummyListField(ClassOutlineImpl context, CPropertyInfo prop, JClass coreList) {
    // the JAXB runtime picks ArrayList if the signature is List,
    // so don't do eager allocation if it's ArrayList.
    // otherwise we need to do eager allocation so that the collection type specified by the user
    // will be used.
    super(context, prop, !coreList.fullName().equals("java.util.ArrayList"));
    this.coreList = coreList.narrow(exposedType.boxify());
    generate();
}
 
Example 16
Source File: NParameterizedType.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public JClass toType(Outline o, Aspect aspect) {
    JClass r = rawType.toType(o,aspect);

    for( NType arg : args )
        r = r.narrow(arg.toType(o,aspect).boxify());

    return r;
}
 
Example 17
Source File: UntypedListField.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @param coreList
 *      A concrete class that implements the List interface.
 *      An instance of this class will be used to store data
 *      for this field.
 */
protected UntypedListField(ClassOutlineImpl context, CPropertyInfo prop, JClass coreList) {
    // the JAXB runtime picks ArrayList if the signature is List,
    // so don't do eager allocation if it's ArrayList.
    // otherwise we need to do eager allocation so that the collection type specified by the user
    // will be used.
    super(context, prop, !coreList.fullName().equals("java.util.ArrayList"));
    this.coreList = coreList.narrow(exposedType.boxify());
    generate();
}
 
Example 18
Source File: DummyListField.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @param coreList
 *      A concrete class that implements the List interface.
 *      An instance of this class will be used to store data
 *      for this field.
 */
protected DummyListField(ClassOutlineImpl context, CPropertyInfo prop, JClass coreList) {
    // the JAXB runtime picks ArrayList if the signature is List,
    // so don't do eager allocation if it's ArrayList.
    // otherwise we need to do eager allocation so that the collection type specified by the user
    // will be used.
    super(context, prop, !coreList.fullName().equals("java.util.ArrayList"));
    this.coreList = coreList.narrow(exposedType.boxify());
    generate();
}
 
Example 19
Source File: NParameterizedType.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public JClass toType(Outline o, Aspect aspect) {
    JClass r = rawType.toType(o,aspect);

    for( NType arg : args )
        r = r.narrow(arg.toType(o,aspect).boxify());

    return r;
}
 
Example 20
Source File: UntypedListField.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @param coreList
 *      A concrete class that implements the List interface.
 *      An instance of this class will be used to store data
 *      for this field.
 */
protected UntypedListField(ClassOutlineImpl context, CPropertyInfo prop, JClass coreList) {
    // the JAXB runtime picks ArrayList if the signature is List,
    // so don't do eager allocation if it's ArrayList.
    // otherwise we need to do eager allocation so that the collection type specified by the user
    // will be used.
    super(context, prop, !coreList.fullName().equals("java.util.ArrayList"));
    this.coreList = coreList.narrow(exposedType.boxify());
    generate();
}