java.lang.Object
org.spongepowered.eventimplgen.eventgencore.Property
All Implemented Interfaces:
Comparable<Property>

public final class Property extends Object implements Comparable<Property>
A property is a getter with possibly a setter pair.
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Get the name of the property.
      Returns:
      The name
    • getType

      public TypeMirror getType()
      Get the type of the paramteer.
      Returns:
      The type
    • getWrapperType

      public TypeMirror getWrapperType()
    • getLeastSpecificMethod

      public ExecutableElement getLeastSpecificMethod()
      Gets the least specific version of the accessor used.
      Returns:
      The least specific accessor
    • getLeastSpecificType

      public TypeMirror getLeastSpecificType()
      Gets the least specific version of the type used

      This is used for the type of the generated field used to hold the value.

      Returns:
      The type
    • getMostSpecificMethod

      public ExecutableElement getMostSpecificMethod()
      Get the most specific version of the accessor used.
      Returns:
      The least specific accessor
    • getMostSpecificType

      public TypeMirror getMostSpecificType()
      Gets the most specific version of the type used
      Returns:
      The type
    • getAccessor

      public ExecutableElement getAccessor()
      Get the method representing the accessor.
      Returns:
      The accessor
    • getAccessorWrapper

      public ExecutableElement getAccessorWrapper()
    • getMutator

      public Optional<ExecutableElement> getMutator()
      Get the method representing the mutator, which or may not exist.
      Returns:
      The mutator
    • isLeastSpecificType

      public boolean isLeastSpecificType(Types types)
      Tests whether this property's type is the least specific version used in the interface hierarchy.
      Returns:
      True if tis property's type is the least specific
    • isMostSpecificType

      public boolean isMostSpecificType(Types types)
    • compareTo

      public int compareTo(Property other)
      Specified by:
      compareTo in interface Comparable<Property>