Class ParserSet.Builder
- Enclosing class:
- ParserSet
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionAdds the specified parsers to this group.Registers the specified parsers with this group.apply(AnnotationWorkList work) Applies the specified annotations to all applicable parser builders in this group.final ParserSet.BuilderbeanContext(Consumer<BeanContext.Builder> operation) Applies an operation to the bean context builder.beanContext(BeanContext.Builder value) Associates an existing bean context builder with all parser builders in this group.protected ParserSetCreates the bean when the bean type isnull or is the default value.booleancanApply(AnnotationWorkList work) Returnstrue if at least one of the specified annotations can be applied to at least one parser builder in this group.clear()Clears out any existing parsers in this group.copy()Makes a copy of this builder.<B extends Parser.Builder>
 ParserSet.BuilderPerforms an action on all parser builders of the specified type in this group.forEach(Consumer<Parser.Builder> action) Performs an action on all parser builders in this group.forEachISP(Consumer<InputStreamParser.Builder> action) Performs an action on all output stream parser builders in this group.forEachRP(Consumer<ReaderParser.Builder> action) Performs an action on all writer parser builders in this group.Overrides the bean returned by theBeanBuilder.build()method.inner()Returns direct access to theParserandParser.Builderobjects in this builder.Sets the specified parsers for this group.toString()Overrides the bean type produced by theBeanBuilder.build()method.
- 
Constructor Details- 
BuilderCreate an empty parser group builder.- Parameters:
- beanStore- The bean store to use for creating beans.
 
- 
BuilderClone an existing parser group.- Parameters:
- copyFrom- The parser group that we're copying settings and parsers from.
 
- 
BuilderClone an existing parser group builder.Parser builders will be cloned during this process. - Parameters:
- copyFrom- The parser group that we're copying settings and parsers from.
 
 
- 
- 
Method Details- 
buildDefaultDescription copied from class:BeanBuilderCreates the bean when the bean type isnull or is the default value.- Overrides:
- buildDefaultin class- BeanBuilder<ParserSet>
- Returns:
- A new bean.
 
- 
copyMakes a copy of this builder.- Returns:
- A new copy of this builder.
 
- 
beanContextAssociates an existing bean context builder with all parser builders in this group.- Parameters:
- value- The bean contest builder to associate.
- Returns:
- This object.
 
- 
beanContextApplies an operation to the bean context builder.- Parameters:
- operation- The operation to apply.
- Returns:
- This object.
 
- 
addAdds the specified parsers to this group.Entries are added in-order to the beginning of the list in the group. The ParserSet.NoInheritclass can be used to clear out the existing list of parsers before adding the new entries.Example:ParserSet.Builder builder = ParserSet.create ();// Create an empty builder. builder .add(FooParser.class );// Now contains: [FooParser] builder .add(BarParser.class , BazParser.class );// Now contains: [BarParser,BazParser,FooParser] builder .add(NoInherit.class , QuxParser.class );// Now contains: [QuxParser] - Parameters:
- values- The parsers to add to this group.
- Returns:
- This object.
- Throws:
- IllegalArgumentException- If one or more values do not extend from- Parser.
 
- 
setSets the specified parsers for this group.Existing values are overwritten. The ParserSet.Inheritclass can be used to insert existing entries in this group into the position specified.Example:ParserSet.Builder builder = ParserSet.create ();// Create an empty builder. builder .set(FooParser.class );// Now contains: [FooParser] builder .set(BarParser.class , BazParser.class );// Now contains: [BarParser,BazParser] builder .set(Inherit.class , QuxParser.class );// Now contains: [BarParser,BazParser,QuxParser] - Parameters:
- values- The parsers to set in this group.
- Returns:
- This object.
- Throws:
- IllegalArgumentException- If one or more values do not extend from- Parseror named- "Inherit" .
 
- 
addRegisters the specified parsers with this group.When passing in pre-instantiated parsers to this group, applying properties and transforms to the group do not affect them. - Parameters:
- s- The parsers to append to this group.
- Returns:
- This object.
 
- 
clearClears out any existing parsers in this group.- Returns:
- This object.
 
- 
canApplyReturnstrue if at least one of the specified annotations can be applied to at least one parser builder in this group.- Parameters:
- work- The work to check.
- Returns:
- true if at least one of the specified annotations can be applied to at least one parser builder in this group.
 
- 
applyApplies the specified annotations to all applicable parser builders in this group.- Parameters:
- work- The annotations to apply.
- Returns:
- This object.
 
- 
forEachPerforms an action on all parser builders in this group.- Parameters:
- action- The action to perform.
- Returns:
- This object.
 
- 
forEachRPPerforms an action on all writer parser builders in this group.- Parameters:
- action- The action to perform.
- Returns:
- This object.
 
- 
forEachISPPerforms an action on all output stream parser builders in this group.- Parameters:
- action- The action to perform.
- Returns:
- This object.
 
- 
forEachPerforms an action on all parser builders of the specified type in this group.- Type Parameters:
- B- The parser builder type.
- Parameters:
- type- The parser builder type.
- action- The action to perform.
- Returns:
- This object.
 
- 
innerReturns direct access to theParserandParser.Builderobjects in this builder.Provided to allow for any extraneous modifications to the list not accomplishable via other methods on this builder such as re-ordering/adding/removing entries. Note that it is up to the user to ensure that the list only contains ParserandParser.Builderobjects.- Returns:
- The inner list of entries in this builder.
 
- 
implDescription copied from class:BeanBuilderOverrides the bean returned by theBeanBuilder.build()method.Use this method if you want this builder to return an already-instantiated bean. - Overrides:
- implin class- BeanBuilder<ParserSet>
- Parameters:
- value- The setting value.
- Returns:
- This object.
 
- 
typeDescription copied from class:BeanBuilderOverrides the bean type produced by theBeanBuilder.build()method.Use this method if you want to instantiated a bean subclass. - Overrides:
- typein class- BeanBuilder<ParserSet>
- Parameters:
- value- The setting value.
- Returns:
- This object.
 
- 
toString
 
-