Interface Property

All Superinterfaces:
ApiHolder
All Known Implementing Classes:
PropertyImpl

public interface Property extends ApiHolder
This represents the broadest definition of a property. only a getGetter() is mandatory

The search for properties starts with the getter getGetter()

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    a Field with the name and tye of this property
     
    2 possible types of getters return type boolean, name prefix "is" and no parameters name prefix is "get" and no parameters when both are present "is" is preferred over get
    a method with the same name as the getter but "set" instead of "is" or "get", return type void and one parameter being the type of the return of the getter
     
    based on the name of the getter without the prefix. if one of the first 2 chars is uppercase the property name is not changed. otherwise the first char is converted to lowercase
    return type of getter
    boolean

    Methods inherited from interface io.determann.shadow.api.ApiHolder

    getApi
  • Method Details

    • getSimpleName

      String getSimpleName()
      based on the name of the getter without the prefix. if one of the first 2 chars is uppercase the property name is not changed. otherwise the first char is converted to lowercase
      See Also:
    • getType

      Shadow<TypeMirror> getType()
      return type of getter
      See Also:
    • getField

      Optional<Field> getField()
      a Field with the name and tye of this property
      See Also:
    • getFieldOrThrow

      Field getFieldOrThrow()
      See Also:
    • getGetter

      Method getGetter()
      2 possible types of getters
      • return type boolean, name prefix "is" and no parameters
      • name prefix is "get" and no parameters
      when both are present "is" is preferred over get
    • getSetter

      Optional<Method> getSetter()
      a method with the same name as the getter but "set" instead of "is" or "get", return type void and one parameter being the type of the return of the getter
      See Also:
    • getSetterOrThrow

      Method getSetterOrThrow()
      See Also:
    • isMutable

      boolean isMutable()