Package org.apache.juneau.http.part
Class PartBeanMeta<T>
java.lang.Object
org.apache.juneau.http.part.PartBeanMeta<T>
- Type Parameters:
T
- The HTTP part bean type.
Holds metadata about http part beans (POJOs that get serialized as HTTP parts such as form data or query parameters).
HTTP part beans are typically annotated with @Query
, @FormData
, or @Path
although it's not an absolute requirement.
HTTP part beans must have one of the following public constructors:
public X(StringpartValue )public X(ObjectpartValue )public X(StringpartName , StringpartValue )public X(StringpartName , ObjectpartValue )
Example
See Also:
-
Method Summary
Modifier and TypeMethodDescriptionConstructs a part bean with the specified name or value.Constructs a part bean with the specified name or value.Returns schema information about this part.static <T> PartBeanMeta<T>
Finds the part bean meta for the specified type.
-
Method Details
-
of
Finds the part bean meta for the specified type.- Type Parameters:
T
- The part bean type.- Parameters:
type
- The part bean type.- Returns:
- The metadata, or
null if a valid constructor could not be found.
-
getSchema
Returns schema information about this part.This is information pulled from
@Query
,@FormData
, or@Path
annotations on the class.- Returns:
- The schema information.
-
construct
Constructs a part bean with the specified name or value.Can only be used on beans where the part name is known.
- Parameters:
value
- The part value.- Returns:
- A newly constructed bean.
-
construct
Constructs a part bean with the specified name or value.- Parameters:
name
- The part name.
Ifnull , uses the value pulled from the@Header(name)
or@Header(value)
annotations.value
- The part value.- Returns:
- A newly constructed bean.
- Throws:
UnsupportedOperationException
- If bean could not be constructed (e.g. couldn't find a constructor).
-