Refine search
/** * 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;
/** * 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; }
/** * 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);
/** * 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;
/** * 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 );
/** * 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; }
/** * @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); }
/** * Reads an annotation on a class. */ @Nullable <A extends Annotation> A getClassAnnotation(Class<A> annotation, C clazz, Locatable srcpos) ;
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);
/** * 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(); }
/** * 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; }
/** * 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); }
/** * 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); }
ImmutableList.of("jetifier-standalone.jar"); @Nullable private Set<ExternalDependency> dependencies; private final Project project; private final BuckFileManager buckFileManager;
public final @Nullable JAXBContextImpl context;
/** * @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 {
/** * 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); }
/** * @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 {