Class PropertyElementQuery

java.lang.Object
io.micronaut.inject.ast.PropertyElementQuery

public final class PropertyElementQuery extends Object
Represents a query for PropertyElement definitions.
Since:
4.0.0
Author:
Denis Stepanov
See Also:
  • 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

      @NonNull public @NonNull PropertyElementQuery ignoreSettersWithDifferingType(boolean shouldIgnore)
      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

      @NonNull public BeanProperties.Visibility getVisibility()
      Returns:
      The visibility strategy.
      See Also:
    • visibility

      Sets the visibility strategy.
      Parameters:
      visibility - The visibility strategy
      Returns:
      This PropertyElementQuery
      See Also:
    • getAccessKinds

      @NonNull public @NonNull Set<BeanProperties.AccessKind> getAccessKinds()
      The access kinds.
      Returns:
      A set of access kinds
      See Also:
    • accessKinds

      Sets the access kinds.
      Parameters:
      accessKinds - The access kinds
      Returns:
      This PropertyElementQuery
    • getIncludes

      @NonNull public @NonNull Set<String> getIncludes()
      The property names to include.
      Returns:
      The includes.
    • includes

      Sets the property names to include.
      Parameters:
      includes - The includes
      Returns:
      This PropertyElementQuery
    • getExcludes

      @NonNull public @NonNull Set<String> 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

      @NonNull public @NonNull String[] getReadPrefixes()
      Returns:
      The read method prefixes.
    • readPrefixes

      @NonNull public @NonNull PropertyElementQuery readPrefixes(String... readPrefixes)
      Sets the read method prefixes.
      Parameters:
      readPrefixes - The read methos prefixes
      Returns:
      This PropertyElementQuery
    • getWritePrefixes

      @NonNull public @NonNull String[] getWritePrefixes()
      Returns:
      The write method prefixes.
    • writePrefixes

      @NonNull public @NonNull PropertyElementQuery writePrefixes(String[] 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

      @NonNull public @NonNull PropertyElementQuery allowStaticProperties(boolean allowStaticProperties)
      Sets whether to allow static properties.
      Parameters:
      allowStaticProperties - True if static properties are allowed.
      Returns:
      This PropertyElementQuery
    • getExcludedAnnotations

      @NonNull public @NonNull Set<String> 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