Class Property
java.lang.Object
org.spongepowered.eventimplgen.eventgencore.Property
- All Implemented Interfaces:
Comparable<Property>
A property is a getter with possibly a setter pair.
-
Constructor Summary
ConstructorsConstructorDescriptionProperty(String name, TypeMirror type, ExecutableElement leastSpecificMethod, ExecutableElement mostSpecificMethod, ExecutableElement accessor, @Nullable ExecutableElement mutator) Create a new property. -
Method Summary
Modifier and TypeMethodDescriptionintGet the method representing the accessor.Gets the least specific version of the accessor used.Gets the least specific version of the type usedGet the most specific version of the accessor used.Gets the most specific version of the type usedGet the method representing the mutator, which or may not exist.getName()Get the name of the property.getType()Get the type of the paramteer.booleanisLeastSpecificType(Types types) Tests whether this property's type is the least specific version used in the interface hierarchy.booleanisMostSpecificType(Types types)
-
Constructor Details
-
Property
public Property(String name, TypeMirror type, ExecutableElement leastSpecificMethod, ExecutableElement mostSpecificMethod, ExecutableElement accessor, @Nullable @Nullable ExecutableElement mutator) Create a new property.- Parameters:
name- The name of the propertytype- The type of propertyleastSpecificMethod- The least specific methodaccessor- The accessormutator- The mutator
-
-
Method Details
-
getName
Get the name of the property.- Returns:
- The name
-
getType
Get the type of the paramteer.- Returns:
- The type
-
getWrapperType
-
getLeastSpecificMethod
Gets the least specific version of the accessor used.- Returns:
- The least specific accessor
-
getLeastSpecificType
Gets the least specific version of the type usedThis is used for the type of the generated field used to hold the value.
- Returns:
- The type
-
getMostSpecificMethod
Get the most specific version of the accessor used.- Returns:
- The least specific accessor
-
getMostSpecificType
Gets the most specific version of the type used- Returns:
- The type
-
getAccessor
Get the method representing the accessor.- Returns:
- The accessor
-
getAccessorWrapper
-
getMutator
Get the method representing the mutator, which or may not exist.- Returns:
- The mutator
-
isLeastSpecificType
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
-
compareTo
- Specified by:
compareToin interfaceComparable<Property>
-