public class DefaultAccessorNamingStrategy extends Object implements AccessorNamingStrategy
AccessorNamingStrategy
service provider interface.Constructor and Description |
---|
DefaultAccessorNamingStrategy() |
Modifier and Type | Method and Description |
---|---|
String |
getCollectionGetterName(String property)
Returns the getter name of the given collection property.
|
String |
getElementName(ExecutableElement adderMethod)
Returns the element name of the given adder method.
|
MethodType |
getMethodType(ExecutableElement method)
Returns the type of the given method.
|
String |
getPropertyName(ExecutableElement getterOrSetterMethod)
Returns the name of the property represented by the given getter or setter method.
|
boolean |
isAdderMethod(ExecutableElement method) |
boolean |
isSetterMethod(ExecutableElement method) |
public MethodType getMethodType(ExecutableElement method)
AccessorNamingStrategy
getMethodType
in interface AccessorNamingStrategy
public boolean isSetterMethod(ExecutableElement method)
public boolean isAdderMethod(ExecutableElement method)
public String getPropertyName(ExecutableElement getterOrSetterMethod)
AccessorNamingStrategy
The default implementation will e.g. return "name" for public String getName()
or public void
setName(String name)
.
getPropertyName
in interface AccessorNamingStrategy
public String getElementName(ExecutableElement adderMethod)
AccessorNamingStrategy
The default implementation will e.g. return "item" for public void addItem(String item)
.
getElementName
in interface AccessorNamingStrategy
public String getCollectionGetterName(String property)
AccessorNamingStrategy
The default implementation will e.g. return "getItems" for "items".
getCollectionGetterName
in interface AccessorNamingStrategy
Copyright © 2012-2015 Gunnar Morling; All rights reserved. Released under the Apache Software License 2.0.