Exemplo n.º 1
0
 public static String getPropertyName(ExecutableElement getterOrSetterMethod) {
   return ACCESSOR_NAMING_STRATEGY.getPropertyName(getterOrSetterMethod);
 }
Exemplo n.º 2
0
 public static boolean isAdderMethod(ExecutableElement method) {
   return isPublic(method)
       && method.getParameters().size() == 1
       && ACCESSOR_NAMING_STRATEGY.getMethodType(method) == MethodType.ADDER;
 }
Exemplo n.º 3
0
 public static String getCollectionGetterName(ExecutableElement targetSetter) {
   String propertyName = ACCESSOR_NAMING_STRATEGY.getPropertyName(targetSetter);
   return ACCESSOR_NAMING_STRATEGY.getCollectionGetterName(propertyName);
 }
Exemplo n.º 4
0
 public static boolean isGetterMethod(ExecutableElement method) {
   return isPublic(method)
       && method.getParameters().isEmpty()
       && ACCESSOR_NAMING_STRATEGY.getMethodType(method) == MethodType.GETTER;
 }
Exemplo n.º 5
0
 /**
  * @param adderMethod the adder method
  * @return the 'element name' to which an adder method applies. If. e.g. an adder method is named
  *     {@code addChild(Child v)}, the element name would be 'Child'.
  */
 public static String getElementNameForAdder(ExecutableElement adderMethod) {
   return ACCESSOR_NAMING_STRATEGY.getElementName(adderMethod);
 }