Package io.micronaut.inject.ast
Class PropertyElementQuery
java.lang.Object
io.micronaut.inject.ast.PropertyElementQuery
Represents a query for
PropertyElement
definitions.- Since:
- 4.0.0
- Author:
- Denis Stepanov
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaccessKinds
(@Nullable Set<BeanProperties.AccessKind> accessKinds) Sets the access kinds.allowSetterWithMultipleArgs
(boolean allowSetterWithMultipleArgs) Sets whether to allow setters with multiple arguments.allowSetterWithZeroArgs
(boolean allowSetterWithZeroArgs) Sets whether to allow zero argument setters for boolean properties etc.allowStaticProperties
(boolean allowStaticProperties) Sets whether to allow static properties.excludedAnnotations
(@Nullable Set<String> excludedAnnotations) Sets the annotations names that should be used to indicate a property is excluded.Sets the excluded property names.The access kinds.The property names to exclude.The property names to include.ignoreSettersWithDifferingType
(boolean shouldIgnore) Set whether to ignore setters that have a different receiver type to the getter return type.Sets the property names to include.boolean
Whether to allow setters with multiple arguments.boolean
boolean
boolean
static @NonNull PropertyElementQuery
of
(@NonNull AnnotationMetadata annotationMetadata) Creates a query for the given metadata.readPrefixes
(String... readPrefixes) Sets the read method prefixes.visibility
(BeanProperties.Visibility visibility) Sets the visibility strategy.writePrefixes
(String[] writePrefixes) Sets the write method prefixes.
-
Constructor Details
-
PropertyElementQuery
public PropertyElementQuery()
-
-
Method Details
-
of
@NonNull public static @NonNull PropertyElementQuery of(@NonNull @NonNull AnnotationMetadata annotationMetadata) Creates a query for the given metadata.- Parameters:
annotationMetadata
- The metadata- Returns:
- The query
-
isIgnoreSettersWithDifferingType
public boolean isIgnoreSettersWithDifferingType()- Returns:
- Whether to ignore setters that don't match the getter return type.
-
ignoreSettersWithDifferingType
Set whether to ignore setters that have a different receiver type to the getter return type.- Parameters:
shouldIgnore
- True if they should be ignored.- Returns:
- This PropertyElementQuery
-
getVisibility
- Returns:
- The visibility strategy.
- See Also:
-
visibility
Sets the visibility strategy.- Parameters:
visibility
- The visibility strategy- Returns:
- This PropertyElementQuery
- See Also:
-
getAccessKinds
The access kinds.- Returns:
- A set of access kinds
- See Also:
-
accessKinds
@NonNull public @NonNull PropertyElementQuery accessKinds(@Nullable @Nullable Set<BeanProperties.AccessKind> accessKinds) Sets the access kinds.- Parameters:
accessKinds
- The access kinds- Returns:
- This PropertyElementQuery
-
getIncludes
The property names to include.- Returns:
- The includes.
-
includes
Sets the property names to include.- Parameters:
includes
- The includes- Returns:
- This PropertyElementQuery
-
getExcludes
The property names to exclude.- Returns:
- The excludes
-
excludes
Sets the excluded property names.- Parameters:
excludes
- The property names to exclude- Returns:
- This PropertyElementQuery
-
getReadPrefixes
- Returns:
- The read method prefixes.
-
readPrefixes
Sets the read method prefixes.- Parameters:
readPrefixes
- The read methos prefixes- Returns:
- This PropertyElementQuery
-
getWritePrefixes
- Returns:
- The write method prefixes.
-
writePrefixes
Sets the write method prefixes.- Parameters:
writePrefixes
- The write prefixes- Returns:
- This PropertyElementQuery
-
isAllowSetterWithZeroArgs
public boolean isAllowSetterWithZeroArgs()- Returns:
- Whether to allow zero argument setters for boolean values etc.
-
allowSetterWithZeroArgs
@NonNull public @NonNull PropertyElementQuery allowSetterWithZeroArgs(boolean allowSetterWithZeroArgs) Sets whether to allow zero argument setters for boolean properties etc.- Parameters:
allowSetterWithZeroArgs
- True to allow zero argument setters- Returns:
- This PropertyElementQuery
-
isAllowSetterWithMultipleArgs
public boolean isAllowSetterWithMultipleArgs()Whether to allow setters with multiple arguments.- Returns:
- True if setters with multiple arguments are allowed.
-
allowSetterWithMultipleArgs
@NonNull public @NonNull PropertyElementQuery allowSetterWithMultipleArgs(boolean allowSetterWithMultipleArgs) Sets whether to allow setters with multiple arguments.- Parameters:
allowSetterWithMultipleArgs
- True if setters with multiple arguments are allowed.- Returns:
- This PropertyElementQuery
-
isAllowStaticProperties
public boolean isAllowStaticProperties()- Returns:
- Whether to allow static properties.
-
allowStaticProperties
Sets whether to allow static properties.- Parameters:
allowStaticProperties
- True if static properties are allowed.- Returns:
- This PropertyElementQuery
-
getExcludedAnnotations
- Returns:
- The excludes annotation names.
-
excludedAnnotations
@NonNull public @NonNull PropertyElementQuery excludedAnnotations(@Nullable @Nullable Set<String> excludedAnnotations) Sets the annotations names that should be used to indicate a property is excluded.- Parameters:
excludedAnnotations
- The excluded annotation names- Returns:
- This PropertyElementQuery
-