本文整理了Java中com.sun.istack.NotNull
类的一些代码示例,展示了NotNull
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NotNull
类的具体详情如下:
包路径:com.sun.istack.NotNull
类名称:NotNull
暂无
代码示例来源: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
/**
* Creates a new {@link BridgeContext} instance.
*
* @return
* always a valid non-null instance.
*
* @since 2.0 EA1
*/
public abstract @NotNull BridgeContext createBridgeContext();
代码示例来源:origin: com.sun.xml.bind/jaxb-impl
/**
* Gets the build information of the JAXB runtime.
*
* @return
* may be null, if the runtime is loaded by a class loader that doesn't support
* the access to the manifest informatino.
*/
public abstract @NotNull String getBuildId();
代码示例来源: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
/**
* Sends the result of the {@link #print(Object)} operation
* to one of the {@link XMLSerializer#leafElement(Name, String, String)} method.
* but with the best representation of the value, not necessarily String.
*/
void writeLeafElement(XMLSerializer w, Name tagName, @NotNull ValueT o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException;
代码示例来源: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
/**
* Gets the {@link JAXBRIContext} to which this object belongs.
*
* @since 2.1
*/
public @NotNull JAXBRIContext getContext() {
return context;
}
代码示例来源: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
/**
* Creates a mini-marshaller/unmarshaller that can process a {@link TypeReference}.
*
* @return
* null if the specified reference is not given to {@link JAXBRIContext#newInstance}.
*
* @since 2.0 EA1
*/
public abstract Bridge createBridge(@NotNull TypeReference ref);
代码示例来源: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
/**
* Converts the given value to its lexical representation.
*
* @param o
* never be null.
* @return
* always non-null valid lexical representation.
*/
@NotNull CharSequence print(@NotNull ValueT o) throws AccessorException;
代码示例来源: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
/**
* Forcibly make a namespace declaration in effect.
*
* If the (prefix,uri) binding is already in-scope, this method
* simply returns the assigned prefix index. Otherwise a new
* declaration will be put.
*/
int force(@NotNull String uri, @NotNull String prefix);
}
代码示例来源: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
/**
* Transducers implicitly work against a single XML type,
* but sometimes (most notably {@link XMLGregorianCalendar},
* an instance may choose different XML types.
*
* @return
* return non-null from this method allows transducers
* to specify the type it wants to marshal to.
* Most of the time this method returns null, in which case
* the implicitly associated type will be used.
*/
QName getTypeName(@NotNull ValueT instance);
}
代码示例来源: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
/**
* Returns the XML type name to be used to marshal the specified instance.
*
* <P>
* Most of the times the type can be determined regardless of the actual
* instance, but there's a few exceptions (most notably {@link XMLGregorianCalendar}),
* so as a general rule we need an instance to determine it.
*/
public QName getTypeName(@NotNull BeanT instance) {
if(typeName==null) return null;
if(typeName instanceof QName) return (QName)typeName;
return ((QName[])typeName)[0];
}
代码示例来源: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
/**
* Returns the name of the XML Type bound to the
* specified Java type.
*
* @param tr
* must not be null. This must be one of the {@link TypeReference}s specified
* in the {@link JAXBRIContext#newInstance} method.
*
* @throws IllegalArgumentException
* if the parameter is null or not a part of the {@link TypeReference}s specified
* in the {@link JAXBRIContext#newInstance} method.
*
* @return null
* if the referenced type is an anonymous and therefore doesn't have a name.
*/
public abstract QName getTypeName(@NotNull TypeReference tr);
代码示例来源: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,
内容来源于网络,如有侵权,请联系作者删除!