Package org.apache.juneau.httppart
Class BaseHttpPartParser
java.lang.Object
org.apache.juneau.Context
org.apache.juneau.BeanContextable
org.apache.juneau.httppart.BaseHttpPartParser
- All Implemented Interfaces:
- AnnotationProvider,- HttpPartParser
- Direct Known Subclasses:
- SimplePartParser
Base class for implementations of 
HttpPartParser
 Notes:
- This class is thread safe and reusable.
See Also:
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from interface org.apache.juneau.httppart.HttpPartParserHttpPartParser.Creator, HttpPartParser.Void
- 
Field SummaryFields inherited from class org.apache.juneau.ContextCONTEXT_APPLY_FILTERFields inherited from interface org.apache.juneau.AnnotationProviderDEFAULT, DISABLE_ANNOTATION_CACHING
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedConstructor.
- 
Method SummaryModifier and TypeMethodDescription<T> ClassMeta<T>getClassMeta(Class<T> c) Returns metadata about the specified class.<T> ClassMeta<T>getClassMeta(Type t, Type... args) Returns metadata about the specified class.<T> Tparse(HttpPartType partType, HttpPartSchema schema, String in, Class<T> toType) Converts the specified input to the specified class type.<T> Tparse(HttpPartType partType, HttpPartSchema schema, String in, Type toType, Type... toTypeArgs) Converts the specified input to the specified class type.<T> Tparse(HttpPartType partType, HttpPartSchema schema, String in, ClassMeta<T> toType) Converts the specified input to the specified class type.Methods inherited from class org.apache.juneau.BeanContextablegetBeanContext, propertiesMethods inherited from class org.apache.juneau.Contextcopy, createBuilder, createSession, firstAnnotation, firstAnnotation, firstAnnotation, firstAnnotation, firstDeclaredAnnotation, forEachAnnotation, forEachAnnotation, forEachAnnotation, forEachAnnotation, forEachDeclaredAnnotation, getSession, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, init, isDebug, lastAnnotation, lastAnnotation, lastAnnotation, lastAnnotation, lastDeclaredAnnotation, toStringMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.juneau.httppart.HttpPartParsergetPartSession
- 
Constructor Details- 
BaseHttpPartParserConstructor.- Parameters:
- builder- The builder for this object.
 
 
- 
- 
Method Details- 
parsepublic <T> T parse(HttpPartType partType, HttpPartSchema schema, String in, ClassMeta<T> toType) throws ParseException, SchemaValidationException Converts the specified input to the specified class type.- Type Parameters:
- T- The POJO type to transform the input into.
- Parameters:
- partType- The part type being parsed.
- schema- Schema information about the part.
 May be- null .
 Not all part parsers use the schema information.
- in- The input being parsed.
- toType- The POJO type to transform the input into.
- Returns:
- The parsed value.
- Throws:
- ParseException- Malformed input encountered.
- SchemaValidationException- If the input or resulting HTTP part object fails schema validation.
 
- 
parsepublic <T> T parse(HttpPartType partType, HttpPartSchema schema, String in, Class<T> toType) throws ParseException, SchemaValidationException Converts the specified input to the specified class type.- Type Parameters:
- T- The POJO type to transform the input into.
- Parameters:
- partType- The part type being parsed.
- schema- Schema information about the part.
 May be- null .
 Not all part parsers use the schema information.
- in- The input being parsed.
- toType- The POJO type to transform the input into.
- Returns:
- The parsed value.
- Throws:
- ParseException- Malformed input encountered.
- SchemaValidationException- If the input or resulting HTTP part object fails schema validation.
 
- 
parsepublic <T> T parse(HttpPartType partType, HttpPartSchema schema, String in, Type toType, Type... toTypeArgs) throws ParseException, SchemaValidationException Converts the specified input to the specified class type.- Type Parameters:
- T- The POJO type to transform the input into.
- Parameters:
- partType- The part type being parsed.
- schema- Schema information about the part.
 May be- null .
 Not all part parsers use the schema information.
- in- The input being parsed.
- toType- The POJO type to transform the input into.
- toTypeArgs- The generic type arguments of the POJO type to transform the input into.
- Returns:
- The parsed value.
- Throws:
- ParseException- Malformed input encountered.
- SchemaValidationException- If the input or resulting HTTP part object fails schema validation.
 
- 
getClassMetaDescription copied from interface:HttpPartParserReturns metadata about the specified class.- Specified by:
- getClassMetain interface- HttpPartParser
- Type Parameters:
- T- The class type.
- Parameters:
- c- The class type.
- Returns:
- Metadata about the specified class.
 
- 
getClassMetaDescription copied from interface:HttpPartParserReturns metadata about the specified class.- Specified by:
- getClassMetain interface- HttpPartParser
- Type Parameters:
- T- The class type.
- Parameters:
- t- The class type.
- args- The class type args.
- Returns:
- Metadata about the specified class.
 
 
-