Package org.instancio.internal.selectors
Class TypeSelectorBuilderImpl
java.lang.Object
org.instancio.internal.selectors.TypeSelectorBuilderImpl
- All Implemented Interfaces:
SelectorBuilder,TargetSelector,TypeSelectorBuilder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<A extends Annotation>
TypeSelectorBuilderMatches types annotated with the specified annotation, ignoring inherited annotations.build()Builds a selector.Excludes specified class from matching.Matches specified type, including subtypes.toString()
-
Constructor Details
-
TypeSelectorBuilderImpl
public TypeSelectorBuilderImpl()
-
-
Method Details
-
of
Description copied from interface:TypeSelectorBuilderMatches specified type, including subtypes. For example, selecting typesof(Collection.class} will matchList,Set, etc.- Specified by:
ofin interfaceTypeSelectorBuilder- Parameters:
type- to match- Returns:
- selector builder
-
annotated
Description copied from interface:TypeSelectorBuilderMatches types annotated with the specified annotation, ignoring inherited annotations.Note: this method only matches annotations declared on classes. To select annotated fields, use
FieldSelectorBuilder.annotated(Class).The method can be chained to require multiple annotations.
- Specified by:
annotatedin interfaceTypeSelectorBuilder- Type Parameters:
A- annotation type- Parameters:
annotation- declared annotation to match- Returns:
- selector builder
-
excluding
Description copied from interface:TypeSelectorBuilderExcludes specified class from matching.The method can be chained to exclude multiple types.
- Specified by:
excludingin interfaceTypeSelectorBuilder- Parameters:
type- type to exclude- Returns:
- selector builder
-
build
Description copied from interface:SelectorBuilderBuilds a selector.- Specified by:
buildin interfaceSelectorBuilder- Returns:
- created selector instance
-
toString
-