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
Constructors -
Method Summary
Modifier and TypeMethodDescription@NonNull PropertyElementQueryaccessKinds(@Nullable Set<BeanProperties.AccessKind> accessKinds) Sets the access kinds.@NonNull PropertyElementQueryallowSetterWithMultipleArgs(boolean allowSetterWithMultipleArgs) Sets whether to allow setters with multiple arguments.@NonNull PropertyElementQueryallowSetterWithZeroArgs(boolean allowSetterWithZeroArgs) Sets whether to allow zero argument setters for boolean properties etc.@NonNull PropertyElementQueryallowStaticProperties(boolean allowStaticProperties) Sets whether to allow static properties.@NonNull PropertyElementQueryexcludedAnnotations(@Nullable Set<String> excludedAnnotations) Sets the annotations names that should be used to indicate a property is excluded.@NonNull PropertyElementQuerySets the excluded property names.@NonNull Set<BeanProperties.AccessKind> The access kinds.The property names to exclude.The property names to include.@NonNull String[]@NonNull BeanProperties.Visibility@NonNull String[]@NonNull PropertyElementQueryignoreSettersWithDifferingType(boolean shouldIgnore) Set whether to ignore setters that have a different receiver type to the getter return type.@NonNull PropertyElementQuerySets the property names to include.booleanWhether to allow setters with multiple arguments.booleanbooleanbooleanstatic @NonNull PropertyElementQueryof(@NonNull AnnotationMetadata annotationMetadata) Creates a query for the given metadata.@NonNull PropertyElementQueryreadPrefixes(String... readPrefixes) Sets the read method prefixes.@NonNull PropertyElementQueryvisibility(BeanProperties.Visibility visibility) Sets the visibility strategy.@NonNull PropertyElementQuerywritePrefixes(String[] writePrefixes) Sets the write method prefixes.
-
Constructor Details
-
PropertyElementQuery
public PropertyElementQuery()
-
-
Method Details
-
of
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
public @NonNull PropertyElementQuery accessKinds(@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
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
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
Sets the annotations names that should be used to indicate a property is excluded.- Parameters:
excludedAnnotations- The excluded annotation names- Returns:
- This PropertyElementQuery
-