本文整理了Java中com.sun.istack.Nullable.<init>()
方法的一些代码示例,展示了Nullable.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Nullable.<init>()
方法的具体详情如下:
包路径:com.sun.istack.Nullable
类名称:Nullable
方法名:<init>
暂无
代码示例来源:origin: com.sun.xml.bind/jaxb-impl
/**
* Prints the responsible field of the given bean to the writer.
*
* <p>
* Use {@link XMLSerializer#getInstance()} to access to the namespace bindings
*
* @return
* if the accessor didn't yield a value, return null.
*/
public abstract @Nullable CharSequence print(@NotNull BeanT o) throws AccessorException, SAXException;
代码示例来源:origin: com.sun.xml.bind/jaxb-impl
/**
* If the given object is bound to an element in XML by JAXB,
* returns the element name.
*
* @return null
* if the object is not bound to an element.
* @throws JAXBException
* if the object is not known to this context.
*
* @since 2.0 EA1
*/
public abstract @Nullable QName getElementName(@NotNull Object o) throws JAXBException;
代码示例来源:origin: com.sun.xml.bind/jaxb-impl
/**
* Allows to retrieve the element name based on Class.
* @param o
* @return
* @throws javax.xml.bind.JAXBException
* @since 2.1.10
*/
public abstract @Nullable QName getElementName(@NotNull Class o) throws JAXBException;
代码示例来源:origin: com.sun.xml.bind/jaxb-impl
/**
* @deprecated
* Compatibility with older versions.
*/
public static JAXBRIContext newInstance(@NotNull Class[] classes,
@Nullable Collection<TypeReference> typeRefs,
@Nullable String defaultNamespaceRemap, boolean c14nSupport ) throws JAXBException {
return newInstance(classes,typeRefs, Collections.<Class,Class>emptyMap(),
defaultNamespaceRemap,c14nSupport,null);
}
代码示例来源:origin: com.sun.xml.bind/jaxb-impl
public static JAXBRIContext newInstance(@NotNull Class[] classes,
@Nullable Collection<TypeReference> typeRefs,
@Nullable Map<Class,Class> subclassReplacements,
@Nullable String defaultNamespaceRemap, boolean c14nSupport,
@Nullable RuntimeAnnotationReader ar) throws JAXBException {
return newInstance(classes, typeRefs, subclassReplacements,
defaultNamespaceRemap, c14nSupport, ar, false, false, false, false);
代码示例来源:origin: com.sun.xml.bind/jaxb-impl
/**
* JAXB calls this method when it sees an unknown element.
*
* <p>
* See the class javadoc for details.
*
* @param nsUri
* Namespace URI of the unknown element. Can be empty but never null.
* @param localName
* Local name of the unknown element. Never be empty nor null.
*
* @return
* If a non-null class is returned, it will be used to unmarshal this element.
* If null is returned, the resolution is assumed to be failed, and
* the unmarshaller will behave as if there was no {@link ClassResolver}
* to begin with (that is, to report it to {@link ValidationEventHandler},
* then move on.)
*
* @throws Exception
* Throwing any {@link RuntimeException} causes the unmarshaller to stop
* immediately. The exception will be propagated up the call stack.
* Throwing any other checked {@link Exception} results in the error
* reproted to {@link ValidationEventHandler} (just like any other error
* during the unmarshalling.)
*/
public abstract @Nullable Class<?> resolveElementName(@NotNull String nsUri, @NotNull String localName) throws Exception;
}
代码示例来源:origin: com.sun.xml.bind/jaxb-impl
/**
* Gets the parameterization of the given base type.
*
* <p>
* For example, given the following
* <pre>{@code
* interface Foo<T> extends List<List<T>> {}
* interface Bar extends Foo<String> {}
* }</pre>
* This method works like this:
* <pre>{@code
* getBaseClass( Bar, List ) = List<List<String>
* getBaseClass( Bar, Foo ) = Foo<String>
* getBaseClass( Foo<? extends Number>, Collection ) = Collection<List<? extends Number>>
* getBaseClass( ArrayList<? extends BigInteger>, List ) = List<? extends BigInteger>
* }</pre>
*
* @param type
* The type that derives from {@code baseType}
* @param baseType
* The class whose parameterization we are interested in.
* @return
* The use of {@code baseType} in {@code type}.
* or null if the type is not assignable to the base type.
* @since 2.0 FCS
*/
public static @Nullable Type getBaseType(@NotNull Type type, @NotNull Class baseType) {
return Utils.REFLECTION_NAVIGATOR.getBaseClass(type, baseType);
}
代码示例来源:origin: com.sun.xml.bind/jaxb-impl
public int put(@NotNull String uri, @Nullable String prefix) {
if(size==nsUris.length) {
代码示例来源:origin: com.sun.xml.bind/jaxb-impl
/**
* @since 2.0.3
*/
public final @NotNull T unmarshal(@NotNull XMLStreamReader in, @Nullable AttachmentUnmarshaller au) throws JAXBException {
Unmarshaller u = context.unmarshallerPool.take();
u.setAttachmentUnmarshaller(au);
return exit(unmarshal(u,in),u);
}
public final @NotNull T unmarshal(@NotNull BridgeContext context, @NotNull XMLStreamReader in) throws JAXBException {
代码示例来源:origin: com.sun.xml.bind/jaxb-impl
/**
* @since 2.0.3
*/
public final @NotNull T unmarshal(@NotNull Source in, @Nullable AttachmentUnmarshaller au) throws JAXBException {
Unmarshaller u = context.unmarshallerPool.take();
u.setAttachmentUnmarshaller(au);
return exit(unmarshal(u,in),u);
}
public final @NotNull T unmarshal(@NotNull BridgeContext context, @NotNull Source in) throws JAXBException {
代码示例来源:origin: com.sun.xml.bind/jaxb-impl
/**
* @since 2.0.3
*/
public final @NotNull T unmarshal(@NotNull Node n, @Nullable AttachmentUnmarshaller au) throws JAXBException {
Unmarshaller u = context.unmarshallerPool.take();
u.setAttachmentUnmarshaller(au);
return exit(unmarshal(u,n),u);
}
public final @NotNull T unmarshal(@NotNull BridgeContext context, @NotNull Node n) throws JAXBException {
代码示例来源:origin: com.sun.xml.bind/jaxb-impl
private @NotNull LocatorEx locator = DUMMY_INSTANCE;
public @Nullable ClassResolver classResolver;
public @Nullable ClassLoader classLoader;
代码示例来源:origin: org.glassfish.jaxb/jaxb-runtime
/**
* If the given object is bound to an element in XML by JAXB,
* returns the element name.
*
* @return null
* if the object is not bound to an element.
* @throws JAXBException
* if the object is not known to this context.
*
* @since 2.0 EA1
*/
public abstract @Nullable QName getElementName(@NotNull Object o) throws JAXBException;
代码示例来源:origin: org.glassfish.jaxb/jaxb-runtime
/**
* Prints the responsible field of the given bean to the writer.
*
* <p>
* Use {@link XMLSerializer#getInstance()} to access to the namespace bindings
*
* @return
* if the accessor didn't yield a value, return null.
*/
public abstract @Nullable CharSequence print(@NotNull BeanT o) throws AccessorException, SAXException;
代码示例来源:origin: org.glassfish.jaxb/jaxb-runtime
/**
* Allows to retrieve the element name based on Class.
* @param o
* @return
* @throws javax.xml.bind.JAXBException
* @since 2.1.10
*/
public abstract @Nullable QName getElementName(@NotNull Class o) throws JAXBException;
代码示例来源:origin: org.glassfish.jaxb/jaxb-runtime
/**
* @deprecated
* Compatibility with older versions.
*/
public static JAXBRIContext newInstance(@NotNull Class[] classes,
@Nullable Collection<TypeReference> typeRefs,
@Nullable String defaultNamespaceRemap, boolean c14nSupport ) throws JAXBException {
return newInstance(classes,typeRefs, Collections.<Class,Class>emptyMap(),
defaultNamespaceRemap,c14nSupport,null);
}
代码示例来源:origin: org.glassfish.jaxb/jaxb-runtime
public static JAXBRIContext newInstance(@NotNull Class[] classes,
@Nullable Collection<TypeReference> typeRefs,
@Nullable Map<Class,Class> subclassReplacements,
@Nullable String defaultNamespaceRemap, boolean c14nSupport,
@Nullable RuntimeAnnotationReader ar) throws JAXBException {
return newInstance(classes, typeRefs, subclassReplacements,
defaultNamespaceRemap, c14nSupport, ar, false, false, false, false);
代码示例来源:origin: org.glassfish.jaxb/jaxb-runtime
/**
* JAXB calls this method when it sees an unknown element.
*
* <p>
* See the class javadoc for details.
*
* @param nsUri
* Namespace URI of the unknown element. Can be empty but never null.
* @param localName
* Local name of the unknown element. Never be empty nor null.
*
* @return
* If a non-null class is returned, it will be used to unmarshal this element.
* If null is returned, the resolution is assumed to be failed, and
* the unmarshaller will behave as if there was no {@link ClassResolver}
* to begin with (that is, to report it to {@link ValidationEventHandler},
* then move on.)
*
* @throws Exception
* Throwing any {@link RuntimeException} causes the unmarshaller to stop
* immediately. The exception will be propagated up the call stack.
* Throwing any other checked {@link Exception} results in the error
* reproted to {@link ValidationEventHandler} (just like any other error
* during the unmarshalling.)
*/
public abstract @Nullable Class<?> resolveElementName(@NotNull String nsUri, @NotNull String localName) throws Exception;
}
代码示例来源:origin: org.glassfish.jaxb/jaxb-runtime
/**
* Gets the parameterization of the given base type.
*
* <p>
* For example, given the following
* <pre>{@code
* interface Foo<T> extends List<List<T>> {}
* interface Bar extends Foo<String> {}
* }</pre>
* This method works like this:
* <pre>{@code
* getBaseClass( Bar, List ) = List<List<String>
* getBaseClass( Bar, Foo ) = Foo<String>
* getBaseClass( Foo<? extends Number>, Collection ) = Collection<List<? extends Number>>
* getBaseClass( ArrayList<? extends BigInteger>, List ) = List<? extends BigInteger>
* }</pre>
*
* @param type
* The type that derives from {@code baseType}
* @param baseType
* The class whose parameterization we are interested in.
* @return
* The use of {@code baseType} in {@code type}.
* or null if the type is not assignable to the base type.
* @since 2.0 FCS
*/
public static @Nullable Type getBaseType(@NotNull Type type, @NotNull Class baseType) {
return Utils.REFLECTION_NAVIGATOR.getBaseClass(type, baseType);
}
代码示例来源:origin: org.glassfish.jaxb/jaxb-runtime
public int put(@NotNull String uri, @Nullable String prefix) {
if(size==nsUris.length) {
内容来源于网络,如有侵权,请联系作者删除!