Esempio n. 1
0
 public static String getPropertyName(ExecutableElement getterOrSetterMethod) {
   return ACCESSOR_NAMING_STRATEGY.getPropertyName(getterOrSetterMethod);
 }
Esempio n. 2
0
 public static boolean isAdderMethod(ExecutableElement method) {
   return isPublic(method)
       && method.getParameters().size() == 1
       && ACCESSOR_NAMING_STRATEGY.getMethodType(method) == MethodType.ADDER;
 }
Esempio n. 3
0
 public static String getCollectionGetterName(ExecutableElement targetSetter) {
   String propertyName = ACCESSOR_NAMING_STRATEGY.getPropertyName(targetSetter);
   return ACCESSOR_NAMING_STRATEGY.getCollectionGetterName(propertyName);
 }
Esempio n. 4
0
 public static boolean isGetterMethod(ExecutableElement method) {
   return isPublic(method)
       && method.getParameters().isEmpty()
       && ACCESSOR_NAMING_STRATEGY.getMethodType(method) == MethodType.GETTER;
 }
Esempio 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);
 }