Package org.apache.juneau.httppart
Class SimplePartParser
java.lang.Object
org.apache.juneau.Context
org.apache.juneau.BeanContextable
org.apache.juneau.httppart.BaseHttpPartParser
org.apache.juneau.httppart.SimplePartParser
- All Implemented Interfaces:
AnnotationProvider
,HttpPartParser
An implementation of
HttpPartParser
that takes in the strings and tries to convert them to POJOs using constructors and static create methods.
The class being created must be one of the following in order to convert it from a string:
-
An
enum . -
Have a public constructor with a single
String parameter. -
Have one of the following public static methods that takes in a single
String parameter:fromString fromValue valueOf parse parseString forName forString
Notes:
- This class is thread safe and reusable.
See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.juneau.httppart.HttpPartParser
HttpPartParser.Creator, HttpPartParser.Void
-
Field Summary
Modifier and TypeFieldDescriptionstatic final SimplePartParser
Reusable instance ofSimplePartParser
, all default settings.static final SimplePartParserSession
Reusable instance ofSimplePartParser
, all default settings.Fields inherited from class org.apache.juneau.Context
CONTEXT_APPLY_FILTER
Fields inherited from interface org.apache.juneau.AnnotationProvider
DISABLE_ANNOTATION_CACHING
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic SimplePartParser.Builder
create()
Creates a new builder for this object.Creates a new parser session.Methods inherited from class org.apache.juneau.httppart.BaseHttpPartParser
getClassMeta, getClassMeta, parse, parse, parse
Methods inherited from class org.apache.juneau.BeanContextable
getBeanContext, properties
Methods inherited from class org.apache.juneau.Context
copy, createBuilder, createSession, firstAnnotation, firstAnnotation, firstAnnotation, firstAnnotation, firstDeclaredAnnotation, forEachAnnotation, forEachAnnotation, forEachAnnotation, forEachAnnotation, forEachDeclaredAnnotation, getSession, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, init, isDebug, lastAnnotation, lastAnnotation, lastAnnotation, lastAnnotation, lastDeclaredAnnotation, toString
-
Field Details
-
DEFAULT
Reusable instance ofSimplePartParser
, all default settings. -
DEFAULT_SESSION
Reusable instance ofSimplePartParser
, all default settings.
-
-
Constructor Details
-
SimplePartParser
Constructor- Parameters:
builder
- The builder for this object.
-
-
Method Details
-
create
Creates a new builder for this object.- Returns:
- A new builder.
-
getPartSession
Description copied from interface:HttpPartParser
Creates a new parser session.- Returns:
- A new parser session.
-