Java 类javax.xml.bind.annotation.XmlList 实例源码

项目:OpenJSharp    文件:SingleTypePropertyInfoImpl.java   
public void link() {
    super.link();

    if (!(NonElement.ANYTYPE_NAME.equals(type.getTypeName()) || type.isSimpleType() || id()==ID.IDREF)) {
            parent.builder.reportError(new IllegalAnnotationException(
            Messages.SIMPLE_TYPE_IS_REQUIRED.format(),
            seed
        ));
    }

    if(!isCollection() && seed.hasAnnotation(XmlList.class)) {
        parent.builder.reportError(new IllegalAnnotationException(
            Messages.XMLLIST_ON_SINGLE_PROPERTY.format(), this
        ));
    }
}
项目:OpenJSharp    文件:TypeAndAnnotationImpl.java   
public void annotate(JAnnotatable programElement) {
    if(typeUse.getAdapterUse()==null && !typeUse.isCollection())
        return; // nothing

    CAdapter adapterUse = typeUse.getAdapterUse();
    if(adapterUse!=null) {
        // ugly, ugly hack
        if(adapterUse.getAdapterIfKnown() == SwaRefAdapterMarker.class) {
            programElement.annotate(XmlAttachmentRef.class);
        } else {
            // [RESULT]
            // @XmlJavaTypeAdapter( Foo.class )
            programElement.annotate2(XmlJavaTypeAdapterWriter.class).value(
                adapterUse.adapterType.toType(outline,EXPOSED));
        }
    }
    if(typeUse.isCollection())
        programElement.annotate(XmlList.class);
}
项目:openjdk-jdk10    文件:TypeAndAnnotationImpl.java   
public void annotate(JAnnotatable programElement) {
    if(typeUse.getAdapterUse()==null && !typeUse.isCollection())
        return; // nothing

    CAdapter adapterUse = typeUse.getAdapterUse();
    if(adapterUse!=null) {
        // ugly, ugly hack
        if(adapterUse.getAdapterIfKnown() == SwaRefAdapterMarker.class) {
            programElement.annotate(XmlAttachmentRef.class);
        } else {
            // [RESULT]
            // @XmlJavaTypeAdapter( Foo.class )
            programElement.annotate2(XmlJavaTypeAdapterWriter.class).value(
                adapterUse.adapterType.toType(outline,EXPOSED));
        }
    }
    if(typeUse.isCollection())
        programElement.annotate(XmlList.class);
}
项目:openjdk-jdk10    文件:SingleTypePropertyInfoImpl.java   
public void link() {
    super.link();

    if (!(NonElement.ANYTYPE_NAME.equals(type.getTypeName()) || type.isSimpleType() || id()==ID.IDREF)) {
            parent.builder.reportError(new IllegalAnnotationException(
            Messages.SIMPLE_TYPE_IS_REQUIRED.format(),
            seed
        ));
    }

    if(!isCollection() && seed.hasAnnotation(XmlList.class)) {
        parent.builder.reportError(new IllegalAnnotationException(
            Messages.XMLLIST_ON_SINGLE_PROPERTY.format(), this
        ));
    }
}
项目:openjdk9    文件:TypeAndAnnotationImpl.java   
public void annotate(JAnnotatable programElement) {
    if(typeUse.getAdapterUse()==null && !typeUse.isCollection())
        return; // nothing

    CAdapter adapterUse = typeUse.getAdapterUse();
    if(adapterUse!=null) {
        // ugly, ugly hack
        if(adapterUse.getAdapterIfKnown() == SwaRefAdapterMarker.class) {
            programElement.annotate(XmlAttachmentRef.class);
        } else {
            // [RESULT]
            // @XmlJavaTypeAdapter( Foo.class )
            programElement.annotate2(XmlJavaTypeAdapterWriter.class).value(
                adapterUse.adapterType.toType(outline,EXPOSED));
        }
    }
    if(typeUse.isCollection())
        programElement.annotate(XmlList.class);
}
项目:openjdk9    文件:SingleTypePropertyInfoImpl.java   
public void link() {
    super.link();

    if (!(NonElement.ANYTYPE_NAME.equals(type.getTypeName()) || type.isSimpleType() || id()==ID.IDREF)) {
            parent.builder.reportError(new IllegalAnnotationException(
            Messages.SIMPLE_TYPE_IS_REQUIRED.format(),
            seed
        ));
    }

    if(!isCollection() && seed.hasAnnotation(XmlList.class)) {
        parent.builder.reportError(new IllegalAnnotationException(
            Messages.XMLLIST_ON_SINGLE_PROPERTY.format(), this
        ));
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:SingleTypePropertyInfoImpl.java   
public void link() {
    super.link();

    if (!(NonElement.ANYTYPE_NAME.equals(type.getTypeName()) || type.isSimpleType() || id()==ID.IDREF)) {
            parent.builder.reportError(new IllegalAnnotationException(
            Messages.SIMPLE_TYPE_IS_REQUIRED.format(),
            seed
        ));
    }

    if(!isCollection() && seed.hasAnnotation(XmlList.class)) {
        parent.builder.reportError(new IllegalAnnotationException(
            Messages.XMLLIST_ON_SINGLE_PROPERTY.format(), this
        ));
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:TypeAndAnnotationImpl.java   
public void annotate(JAnnotatable programElement) {
    if(typeUse.getAdapterUse()==null && !typeUse.isCollection())
        return; // nothing

    CAdapter adapterUse = typeUse.getAdapterUse();
    if(adapterUse!=null) {
        // ugly, ugly hack
        if(adapterUse.getAdapterIfKnown() == SwaRefAdapterMarker.class) {
            programElement.annotate(XmlAttachmentRef.class);
        } else {
            // [RESULT]
            // @XmlJavaTypeAdapter( Foo.class )
            programElement.annotate2(XmlJavaTypeAdapterWriter.class).value(
                adapterUse.adapterType.toType(outline,EXPOSED));
        }
    }
    if(typeUse.isCollection())
        programElement.annotate(XmlList.class);
}
项目:jbossws-cxf    文件:WSProviderPlugin.java   
/**
 * Sets the main output directory.
 * If the directory does not exist, it will be created.
 */
public void testOutputDirectory() throws Exception
{
   provide();
   ClassLoader loader = getArtefactClassLoader();
   Class<?> responseWrapper = loader.loadClass("org.jboss.test.ws.jaxws.smoke.tools.jaxws.AddResponse");
   XmlRootElement rootElement = (XmlRootElement) responseWrapper.getAnnotation(XmlRootElement.class);
   assertNotNull("@XmlRootElement missing from response wrapper", rootElement);
   assertEquals("Wrong namespace", rootElement.namespace(), "http://foo.bar.com/calculator");
   responseWrapper = loader.loadClass("org.jboss.test.ws.jaxws.smoke.tools.jaxws.ProcessListResponse");
   XmlList xmlList = (XmlList) responseWrapper.getDeclaredField("_return").getAnnotation(XmlList.class);
   assertNotNull("@XmlList missing from response wrapper's _return field", xmlList);
   responseWrapper = loader.loadClass("org.jboss.test.ws.jaxws.smoke.tools.jaxws.ProcessCustomResponse");
   XmlJavaTypeAdapter xmlJavaTypeAdapter = (XmlJavaTypeAdapter)responseWrapper.getDeclaredField("_return").getAnnotation(XmlJavaTypeAdapter.class);
   assertNotNull("@XmlJavaTypeAdapter missing from response wrapper's _return field", xmlJavaTypeAdapter);
   assertEquals("org.jboss.test.ws.jaxws.smoke.tools.CustomAdapter", xmlJavaTypeAdapter.value().getName());
}
项目:infobip-open-jdk-8    文件:SingleTypePropertyInfoImpl.java   
public void link() {
    super.link();

    if (!(NonElement.ANYTYPE_NAME.equals(type.getTypeName()) || type.isSimpleType() || id()==ID.IDREF)) {
            parent.builder.reportError(new IllegalAnnotationException(
            Messages.SIMPLE_TYPE_IS_REQUIRED.format(),
            seed
        ));
    }

    if(!isCollection() && seed.hasAnnotation(XmlList.class)) {
        parent.builder.reportError(new IllegalAnnotationException(
            Messages.XMLLIST_ON_SINGLE_PROPERTY.format(), this
        ));
    }
}
项目:infobip-open-jdk-8    文件:TypeAndAnnotationImpl.java   
public void annotate(JAnnotatable programElement) {
    if(typeUse.getAdapterUse()==null && !typeUse.isCollection())
        return; // nothing

    CAdapter adapterUse = typeUse.getAdapterUse();
    if(adapterUse!=null) {
        // ugly, ugly hack
        if(adapterUse.getAdapterIfKnown() == SwaRefAdapterMarker.class) {
            programElement.annotate(XmlAttachmentRef.class);
        } else {
            // [RESULT]
            // @XmlJavaTypeAdapter( Foo.class )
            programElement.annotate2(XmlJavaTypeAdapterWriter.class).value(
                adapterUse.adapterType.toType(outline,EXPOSED));
        }
    }
    if(typeUse.isCollection())
        programElement.annotate(XmlList.class);
}
项目:cxf-plus    文件:SingleTypePropertyInfoImpl.java   
public void link() {
    super.link();

    if (!(NonElement.ANYTYPE_NAME.equals(type.getTypeName()) || type.isSimpleType() || id()==ID.IDREF)) {
            parent.builder.reportError(new IllegalAnnotationException(
            Messages.SIMPLE_TYPE_IS_REQUIRED.format(),
            seed
        ));
    }

    if(!isCollection() && seed.hasAnnotation(XmlList.class)) {
        parent.builder.reportError(new IllegalAnnotationException(
            Messages.XMLLIST_ON_SINGLE_PROPERTY.format(), this
        ));
    }
}
项目:cxf-plus    文件:CXFPlusServiceFactoryBean.java   
private Map<Class, Boolean> getJaxbAnnoMap(MessagePartInfo mpi) {
    Map<Class, Boolean> map = new ConcurrentHashMap<Class, Boolean>();
    Annotation[] anns = getMethodParameterAnnotations(mpi);

    if (anns != null) {
        for (Annotation anno : anns) {
            if (anno instanceof XmlList) {
                map.put(XmlList.class, true);
            }
            if (anno instanceof XmlAttachmentRef) {
                map.put(XmlAttachmentRef.class, true);
            }
            if (anno instanceof XmlJavaTypeAdapter) {
                map.put(XmlJavaTypeAdapter.class, true);
            }
            if (anno instanceof XmlElementWrapper) {
                map.put(XmlElementWrapper.class, true);
            }
        }
    }
    return map;
}
项目:cxf-plus    文件:PlusWrapperClassGenerator.java   
private List<Annotation> getJaxbAnnos(MessagePartInfo mpi) {
    List<Annotation> list = new java.util.concurrent.CopyOnWriteArrayList<Annotation>();
    Annotation[] anns = getMethodParameterAnnotations(mpi);
    if (anns != null) {
        for (Annotation anno : anns) {
            if (anno.annotationType() == XmlList.class 
                || anno.annotationType() == XmlAttachmentRef.class
                || anno.annotationType() == XmlJavaTypeAdapter.class
                || anno.annotationType() == XmlMimeType.class
                || anno.annotationType() == XmlElement.class
                || anno.annotationType() == XmlElementWrapper.class) {
                list.add(anno);
            }
        }
    }
    return list;
}
项目:cxf-plus    文件:CXFPlusServiceBean.java   
private Map<Class, Boolean> getJaxbAnnoMap(MessagePartInfo mpi) {
    Map<Class, Boolean> map = new ConcurrentHashMap<Class, Boolean>();
    Annotation[] anns = getMethodParameterAnnotations(mpi);

    if (anns != null) {
        for (Annotation anno : anns) {
            if (anno instanceof XmlList) {
                map.put(XmlList.class, true);
            }
            if (anno instanceof XmlAttachmentRef) {
                map.put(XmlAttachmentRef.class, true);
            }
            if (anno instanceof XmlJavaTypeAdapter) {
                map.put(XmlJavaTypeAdapter.class, true);
            }
            if (anno instanceof XmlElementWrapper) {
                map.put(XmlElementWrapper.class, true);
            }
        }
    }
    return map;
}
项目:OLD-OpenJDK8    文件:SingleTypePropertyInfoImpl.java   
public void link() {
    super.link();

    if (!(NonElement.ANYTYPE_NAME.equals(type.getTypeName()) || type.isSimpleType() || id()==ID.IDREF)) {
            parent.builder.reportError(new IllegalAnnotationException(
            Messages.SIMPLE_TYPE_IS_REQUIRED.format(),
            seed
        ));
    }

    if(!isCollection() && seed.hasAnnotation(XmlList.class)) {
        parent.builder.reportError(new IllegalAnnotationException(
            Messages.XMLLIST_ON_SINGLE_PROPERTY.format(), this
        ));
    }
}
项目:OLD-OpenJDK8    文件:TypeAndAnnotationImpl.java   
public void annotate(JAnnotatable programElement) {
    if(typeUse.getAdapterUse()==null && !typeUse.isCollection())
        return; // nothing

    CAdapter adapterUse = typeUse.getAdapterUse();
    if(adapterUse!=null) {
        // ugly, ugly hack
        if(adapterUse.getAdapterIfKnown() == SwaRefAdapterMarker.class) {
            programElement.annotate(XmlAttachmentRef.class);
        } else {
            // [RESULT]
            // @XmlJavaTypeAdapter( Foo.class )
            programElement.annotate2(XmlJavaTypeAdapterWriter.class).value(
                adapterUse.adapterType.toType(outline,EXPOSED));
        }
    }
    if(typeUse.isCollection())
        programElement.annotate(XmlList.class);
}
项目:openjdk-icedtea7    文件:SingleTypePropertyInfoImpl.java   
public void link() {
    super.link();

    if (!(NonElement.ANYTYPE_NAME.equals(type.getTypeName()) || type.isSimpleType() || id()==ID.IDREF)) {
            parent.builder.reportError(new IllegalAnnotationException(
            Messages.SIMPLE_TYPE_IS_REQUIRED.format(),
            seed
        ));
    }

    if(!isCollection() && seed.hasAnnotation(XmlList.class)) {
        parent.builder.reportError(new IllegalAnnotationException(
            Messages.XMLLIST_ON_SINGLE_PROPERTY.format(), this
        ));
    }
}
项目:openjdk-icedtea7    文件:TypeAndAnnotationImpl.java   
public void annotate(JAnnotatable programElement) {
    if(typeUse.getAdapterUse()==null && !typeUse.isCollection())
        return; // nothing

    CAdapter adapterUse = typeUse.getAdapterUse();
    if(adapterUse!=null) {
        // ugly, ugly hack
        if(adapterUse.getAdapterIfKnown()== SwaRefAdapter.class) {
            programElement.annotate(XmlAttachmentRef.class);
        } else {
            // [RESULT]
            // @XmlJavaTypeAdapter( Foo.class )
            programElement.annotate2(XmlJavaTypeAdapterWriter.class).value(
                adapterUse.adapterType.toType(outline,EXPOSED));
        }
    }
    if(typeUse.isCollection())
        programElement.annotate(XmlList.class);
}
项目:OpenJSharp    文件:ElementPropertyInfoImpl.java   
ElementPropertyInfoImpl(
    ClassInfoImpl<TypeT,ClassDeclT,FieldT,MethodT> parent,
    PropertySeed<TypeT,ClassDeclT,FieldT,MethodT> propertySeed) {
    super(parent, propertySeed);

    isValueList = seed.hasAnnotation(XmlList.class);

}
项目:OpenJSharp    文件:Ref.java   
public Ref(AnnotationReader<T,C,?,?> reader,
           Navigator<T,C,?,?> nav,
           T type, XmlJavaTypeAdapter xjta, XmlList xl ) {
    Adapter<T,C> adapter=null;
    if(xjta!=null) {
        adapter = new Adapter<T,C>(xjta,reader,nav);
        type = adapter.defaultType;
    }

    this.type = type;
    this.adapter = adapter;
    this.valueList = xl!=null;
}
项目:OpenJSharp    文件:JAXBContextImpl.java   
private NonElement<Type,Class> getXmlType(RuntimeTypeInfoSet tis, TypeReference tr) {
    if(tr==null)
        throw new IllegalArgumentException();

    XmlJavaTypeAdapter xjta = tr.get(XmlJavaTypeAdapter.class);
    XmlList xl = tr.get(XmlList.class);

    Ref<Type,Class> ref = new Ref<Type,Class>(annotationReader, tis.getNavigator(), tr.type, xjta, xl );

    return tis.getTypeInfo(ref);
}
项目:OpenJSharp    文件:JavaCompilerImpl.java   
public J2SJAXBModel bind(
    Collection<Reference> rootClasses,
    Map<QName,Reference> additionalElementDecls,
    String defaultNamespaceRemap,
    ProcessingEnvironment env) {

    ModelBuilder<TypeMirror, TypeElement, VariableElement, ExecutableElement> builder =
            new ModelBuilder<TypeMirror, TypeElement, VariableElement, ExecutableElement>(
            InlineAnnotationReaderImpl.theInstance,
            new ApNavigator(env),
            Collections.<TypeElement, TypeElement>emptyMap(),
            defaultNamespaceRemap );

    builder.setErrorHandler(new ErrorHandlerImpl(env.getMessager()));

    for ( Reference ref : rootClasses ) {
        TypeMirror t = ref.type;

        XmlJavaTypeAdapter xjta = ref.annotations.getAnnotation(XmlJavaTypeAdapter.class);
        XmlList xl = ref.annotations.getAnnotation(XmlList.class);

        builder.getTypeInfo(new Ref<TypeMirror, TypeElement>(builder, t, xjta, xl));
    }

    TypeInfoSet<TypeMirror, TypeElement, VariableElement, ExecutableElement> r = builder.link();
    if(r==null)     return null;

    if(additionalElementDecls==null)
        additionalElementDecls = Collections.emptyMap();
    else {
        // fool proof check
        for (Map.Entry<QName, ? extends Reference> e : additionalElementDecls.entrySet()) {
            if(e.getKey()==null)
                throw new IllegalArgumentException("nulls in additionalElementDecls");
        }
    }
    return new JAXBModelImpl(r, builder.reader, rootClasses, new HashMap<QName, Reference>(additionalElementDecls));
}
项目:OpenJSharp    文件:JAXBModelImpl.java   
private NonElement<TypeMirror, TypeElement> getXmlType(Reference r) {
    if(r==null)
        throw new IllegalArgumentException();

    XmlJavaTypeAdapter xjta = r.annotations.getAnnotation(XmlJavaTypeAdapter.class);
    XmlList xl = r.annotations.getAnnotation(XmlList.class);

    Ref<TypeMirror, TypeElement> ref = new Ref<TypeMirror, TypeElement>(
        reader,types.getNavigator(),r.type,xjta,xl);

    return types.getTypeInfo(ref);
}
项目:openjdk-jdk10    文件:JavaCompilerImpl.java   
public J2SJAXBModel bind(
    Collection<Reference> rootClasses,
    Map<QName,Reference> additionalElementDecls,
    String defaultNamespaceRemap,
    ProcessingEnvironment env) {

    ModelBuilder<TypeMirror, TypeElement, VariableElement, ExecutableElement> builder =
            new ModelBuilder<TypeMirror, TypeElement, VariableElement, ExecutableElement>(
            InlineAnnotationReaderImpl.theInstance,
            new ApNavigator(env),
            Collections.<TypeElement, TypeElement>emptyMap(),
            defaultNamespaceRemap );

    builder.setErrorHandler(new ErrorHandlerImpl(env.getMessager()));

    for ( Reference ref : rootClasses ) {
        TypeMirror t = ref.type;

        XmlJavaTypeAdapter xjta = ref.annotations.getAnnotation(XmlJavaTypeAdapter.class);
        XmlList xl = ref.annotations.getAnnotation(XmlList.class);

        builder.getTypeInfo(new Ref<TypeMirror, TypeElement>(builder, t, xjta, xl));
    }

    TypeInfoSet<TypeMirror, TypeElement, VariableElement, ExecutableElement> r = builder.link();
    if(r==null)     return null;

    if(additionalElementDecls==null)
        additionalElementDecls = Collections.emptyMap();
    else {
        // fool proof check
        for (Map.Entry<QName, ? extends Reference> e : additionalElementDecls.entrySet()) {
            if(e.getKey()==null)
                throw new IllegalArgumentException("nulls in additionalElementDecls");
        }
    }
    return new JAXBModelImpl(r, builder.reader, rootClasses, new HashMap<QName, Reference>(additionalElementDecls));
}
项目:openjdk-jdk10    文件:JAXBModelImpl.java   
private NonElement<TypeMirror, TypeElement> getXmlType(Reference r) {
    if(r==null)
        throw new IllegalArgumentException();

    XmlJavaTypeAdapter xjta = r.annotations.getAnnotation(XmlJavaTypeAdapter.class);
    XmlList xl = r.annotations.getAnnotation(XmlList.class);

    Ref<TypeMirror, TypeElement> ref = new Ref<TypeMirror, TypeElement>(
        reader,types.getNavigator(),r.type,xjta,xl);

    return types.getTypeInfo(ref);
}
项目:openjdk-jdk10    文件:ElementPropertyInfoImpl.java   
ElementPropertyInfoImpl(
    ClassInfoImpl<TypeT,ClassDeclT,FieldT,MethodT> parent,
    PropertySeed<TypeT,ClassDeclT,FieldT,MethodT> propertySeed) {
    super(parent, propertySeed);

    isValueList = seed.hasAnnotation(XmlList.class);

}
项目:openjdk-jdk10    文件:Ref.java   
public Ref(AnnotationReader<T,C,?,?> reader,
           Navigator<T,C,?,?> nav,
           T type, XmlJavaTypeAdapter xjta, XmlList xl ) {
    Adapter<T,C> adapter=null;
    if(xjta!=null) {
        adapter = new Adapter<T,C>(xjta,reader,nav);
        type = adapter.defaultType;
    }

    this.type = type;
    this.adapter = adapter;
    this.valueList = xl!=null;
}
项目:openjdk-jdk10    文件:JAXBContextImpl.java   
private NonElement<Type,Class> getXmlType(RuntimeTypeInfoSet tis, TypeReference tr) {
    if(tr==null)
        throw new IllegalArgumentException();

    XmlJavaTypeAdapter xjta = tr.get(XmlJavaTypeAdapter.class);
    XmlList xl = tr.get(XmlList.class);

    Ref<Type,Class> ref = new Ref<Type,Class>(annotationReader, tis.getNavigator(), tr.type, xjta, xl );

    return tis.getTypeInfo(ref);
}
项目:openjdk9    文件:JavaCompilerImpl.java   
public J2SJAXBModel bind(
    Collection<Reference> rootClasses,
    Map<QName,Reference> additionalElementDecls,
    String defaultNamespaceRemap,
    ProcessingEnvironment env) {

    ModelBuilder<TypeMirror, TypeElement, VariableElement, ExecutableElement> builder =
            new ModelBuilder<TypeMirror, TypeElement, VariableElement, ExecutableElement>(
            InlineAnnotationReaderImpl.theInstance,
            new ApNavigator(env),
            Collections.<TypeElement, TypeElement>emptyMap(),
            defaultNamespaceRemap );

    builder.setErrorHandler(new ErrorHandlerImpl(env.getMessager()));

    for ( Reference ref : rootClasses ) {
        TypeMirror t = ref.type;

        XmlJavaTypeAdapter xjta = ref.annotations.getAnnotation(XmlJavaTypeAdapter.class);
        XmlList xl = ref.annotations.getAnnotation(XmlList.class);

        builder.getTypeInfo(new Ref<TypeMirror, TypeElement>(builder, t, xjta, xl));
    }

    TypeInfoSet<TypeMirror, TypeElement, VariableElement, ExecutableElement> r = builder.link();
    if(r==null)     return null;

    if(additionalElementDecls==null)
        additionalElementDecls = Collections.emptyMap();
    else {
        // fool proof check
        for (Map.Entry<QName, ? extends Reference> e : additionalElementDecls.entrySet()) {
            if(e.getKey()==null)
                throw new IllegalArgumentException("nulls in additionalElementDecls");
        }
    }
    return new JAXBModelImpl(r, builder.reader, rootClasses, new HashMap<QName, Reference>(additionalElementDecls));
}
项目:openjdk9    文件:JAXBModelImpl.java   
private NonElement<TypeMirror, TypeElement> getXmlType(Reference r) {
    if(r==null)
        throw new IllegalArgumentException();

    XmlJavaTypeAdapter xjta = r.annotations.getAnnotation(XmlJavaTypeAdapter.class);
    XmlList xl = r.annotations.getAnnotation(XmlList.class);

    Ref<TypeMirror, TypeElement> ref = new Ref<TypeMirror, TypeElement>(
        reader,types.getNavigator(),r.type,xjta,xl);

    return types.getTypeInfo(ref);
}
项目:openjdk9    文件:ElementPropertyInfoImpl.java   
ElementPropertyInfoImpl(
    ClassInfoImpl<TypeT,ClassDeclT,FieldT,MethodT> parent,
    PropertySeed<TypeT,ClassDeclT,FieldT,MethodT> propertySeed) {
    super(parent, propertySeed);

    isValueList = seed.hasAnnotation(XmlList.class);

}
项目:openjdk9    文件:Ref.java   
public Ref(AnnotationReader<T,C,?,?> reader,
           Navigator<T,C,?,?> nav,
           T type, XmlJavaTypeAdapter xjta, XmlList xl ) {
    Adapter<T,C> adapter=null;
    if(xjta!=null) {
        adapter = new Adapter<T,C>(xjta,reader,nav);
        type = adapter.defaultType;
    }

    this.type = type;
    this.adapter = adapter;
    this.valueList = xl!=null;
}
项目:openjdk9    文件:JAXBContextImpl.java   
private NonElement<Type,Class> getXmlType(RuntimeTypeInfoSet tis, TypeReference tr) {
    if(tr==null)
        throw new IllegalArgumentException();

    XmlJavaTypeAdapter xjta = tr.get(XmlJavaTypeAdapter.class);
    XmlList xl = tr.get(XmlList.class);

    Ref<Type,Class> ref = new Ref<Type,Class>(annotationReader, tis.getNavigator(), tr.type, xjta, xl );

    return tis.getTypeInfo(ref);
}
项目:lookaside_java-1.8.0-openjdk    文件:ElementPropertyInfoImpl.java   
ElementPropertyInfoImpl(
    ClassInfoImpl<TypeT,ClassDeclT,FieldT,MethodT> parent,
    PropertySeed<TypeT,ClassDeclT,FieldT,MethodT> propertySeed) {
    super(parent, propertySeed);

    isValueList = seed.hasAnnotation(XmlList.class);

}
项目:lookaside_java-1.8.0-openjdk    文件:Ref.java   
public Ref(AnnotationReader<T,C,?,?> reader,
           Navigator<T,C,?,?> nav,
           T type, XmlJavaTypeAdapter xjta, XmlList xl ) {
    Adapter<T,C> adapter=null;
    if(xjta!=null) {
        adapter = new Adapter<T,C>(xjta,reader,nav);
        type = adapter.defaultType;
    }

    this.type = type;
    this.adapter = adapter;
    this.valueList = xl!=null;
}
项目:lookaside_java-1.8.0-openjdk    文件:JAXBContextImpl.java   
private NonElement<Type,Class> getXmlType(RuntimeTypeInfoSet tis, TypeReference tr) {
    if(tr==null)
        throw new IllegalArgumentException();

    XmlJavaTypeAdapter xjta = tr.get(XmlJavaTypeAdapter.class);
    XmlList xl = tr.get(XmlList.class);

    Ref<Type,Class> ref = new Ref<Type,Class>(annotationReader, tis.getNavigator(), tr.type, xjta, xl );

    return tis.getTypeInfo(ref);
}
项目:lookaside_java-1.8.0-openjdk    文件:JavaCompilerImpl.java   
public J2SJAXBModel bind(
    Collection<Reference> rootClasses,
    Map<QName,Reference> additionalElementDecls,
    String defaultNamespaceRemap,
    ProcessingEnvironment env) {

    ModelBuilder<TypeMirror, TypeElement, VariableElement, ExecutableElement> builder =
            new ModelBuilder<TypeMirror, TypeElement, VariableElement, ExecutableElement>(
            InlineAnnotationReaderImpl.theInstance,
            new ApNavigator(env),
            Collections.<TypeElement, TypeElement>emptyMap(),
            defaultNamespaceRemap );

    builder.setErrorHandler(new ErrorHandlerImpl(env.getMessager()));

    for ( Reference ref : rootClasses ) {
        TypeMirror t = ref.type;

        XmlJavaTypeAdapter xjta = ref.annotations.getAnnotation(XmlJavaTypeAdapter.class);
        XmlList xl = ref.annotations.getAnnotation(XmlList.class);

        builder.getTypeInfo(new Ref<TypeMirror, TypeElement>(builder, t, xjta, xl));
    }

    TypeInfoSet<TypeMirror, TypeElement, VariableElement, ExecutableElement> r = builder.link();
    if(r==null)     return null;

    if(additionalElementDecls==null)
        additionalElementDecls = Collections.emptyMap();
    else {
        // fool proof check
        for (Map.Entry<QName, ? extends Reference> e : additionalElementDecls.entrySet()) {
            if(e.getKey()==null)
                throw new IllegalArgumentException("nulls in additionalElementDecls");
        }
    }
    return new JAXBModelImpl(r, builder.reader, rootClasses, new HashMap<QName, Reference>(additionalElementDecls));
}
项目:lookaside_java-1.8.0-openjdk    文件:JAXBModelImpl.java   
private NonElement<TypeMirror, TypeElement> getXmlType(Reference r) {
    if(r==null)
        throw new IllegalArgumentException();

    XmlJavaTypeAdapter xjta = r.annotations.getAnnotation(XmlJavaTypeAdapter.class);
    XmlList xl = r.annotations.getAnnotation(XmlList.class);

    Ref<TypeMirror, TypeElement> ref = new Ref<TypeMirror, TypeElement>(
        reader,types.getNavigator(),r.type,xjta,xl);

    return types.getTypeInfo(ref);
}
项目:infobip-open-jdk-8    文件:ElementPropertyInfoImpl.java   
ElementPropertyInfoImpl(
    ClassInfoImpl<TypeT,ClassDeclT,FieldT,MethodT> parent,
    PropertySeed<TypeT,ClassDeclT,FieldT,MethodT> propertySeed) {
    super(parent, propertySeed);

    isValueList = seed.hasAnnotation(XmlList.class);

}