com.sun.istack.Nullable类的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(7.5k)|赞(0)|评价(0)|浏览(183)

本文整理了Java中com.sun.istack.Nullable类的一些代码示例,展示了Nullable类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Nullable类的具体详情如下:
包路径:com.sun.istack.Nullable
类名称:Nullable

Nullable介绍

暂无

代码示例

代码示例来源: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

/**
 * Returns the optimized version of the same accessor.
 *
 * @param context The {@link JAXBContextImpl} that owns the whole thing.
 *                (See {@link RuntimeModelBuilder#context}.)
 * @return At least the implementation can return {@code this}.
 */
public Accessor<BeanT, ValueT> optimize(@Nullable JAXBContextImpl context) {
  return this;
}

代码示例来源:origin: com.sun.xml.bind/jaxb-impl

/**
 * Reads an annotation on the package that the given class belongs to.
 */
@Nullable
<A extends Annotation> A getPackageAnnotation(Class<A> annotation, C clazz, Locatable srcpos);

代码示例来源: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

/**
 * Reads an annotation on a parameter of the method.
 *
 * @return null
 *      if the annotation was not found.
 */
@Nullable
<A extends Annotation> A getMethodParameterAnnotation(
    Class<A> annotation, M method, int paramIndex, Locatable srcPos );

代码示例来源: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

/**
 * Fills in the data object by a portion of the byte[].
 *
 * @param len
 *      data[0] to data[len-1] are treated as the data.
 */
public void set(byte[] data, int len, @Nullable String mimeType) {
  this.data = data;
  this.dataLen = len;
  this.dataHandler = null;
  this.mimeType = mimeType;
}

代码示例来源: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

/**
 * Reads an annotation on a class.
 */
@Nullable
<A extends Annotation> A getClassAnnotation(Class<A> annotation, C clazz, Locatable srcpos) ;

代码示例来源: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

/**
   * The effective value of {@link XmlSchemaType} annotation, if any.
   *
   * <p>
   * If the property doesn't have {@link XmlSchemaType} annotation,
   * this method returns null.
   *
   * <p>
   * Since a type name is a property of a Java type, not a Java property,
   * A schema type name of a Java type should be primarily obtained
   * by using {@link NonElement#getTypeName()}. This method is to correctly
   * implement the ugly semantics of {@link XmlSchemaType} (namely
   * when this returns non-null, it overrides the type names of all types
   * that are in this property.)
   */
  @Nullable QName getSchemaType();
}

代码示例来源: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: org.apache.hadoop/hadoop-common

/**
 * Returns the default (first) host name associated by the provided
 * nameserver with the address bound to the specified network interface.
 *
 * @param strInterface
 *            The name of the network interface to query (e.g. eth0)
 * @param nameserver
 *            The DNS host name
 * @throws UnknownHostException
 *             If one is encountered while querying the default interface
 */
public static String getDefaultHost(@Nullable String strInterface,
                  @Nullable String nameserver)
  throws UnknownHostException {
 return getDefaultHost(strInterface, nameserver, false);
}

代码示例来源: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: uber/okbuck

ImmutableList.of("jetifier-standalone.jar");
@Nullable private Set<ExternalDependency> dependencies;
private final Project project;
private final BuckFileManager buckFileManager;

代码示例来源: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

public final @Nullable JAXBContextImpl context;

代码示例来源: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

/**
 * Fills in the data object by the byte[] of the exact length.
 *
 * @param data
 *      this buffer may be owned directly by the unmarshaleld JAXB object.
 */
public void set(byte[] data, @Nullable String mimeType) {
  set(data, data.length, mimeType);
}

代码示例来源: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 {

相关文章

Nullable类方法