Tabnine Logo
RebindUtils.getGetter
Code IndexAdd Tabnine to your IDE (free)

How to use
getGetter
method
in
sk.seges.acris.core.rebind.RebindUtils

Best Java code snippets using sk.seges.acris.core.rebind.RebindUtils.getGetter (Showing top 6 results out of 315)

origin: sk.seges.acris/acris-client-core

/**
 * recursively calls {@link RebindUtils#getGetter(JClassType, String)} to
 * handle "more-dots strings"<br />
 * e.g.: address.street returns getAddress().getStreet
 * 
 * @param beanType
 * @param fieldName
 * @return string - chain of getter methods
 * @throws NotFoundException
 */
public static String getGetterForMoreDotsInBeanTable(JClassType beanType, String fieldName)
    throws NotFoundException {
  JMethod method = null;
  int dotIndex = fieldName.indexOf(".");
  if (dotIndex == -1) {
    method = getGetter(beanType, fieldName);
    if (method == null)
      throw new NotFoundException();
    return method.getName();
  } else {
    method = getGetter(beanType, fieldName.substring(0, dotIndex));
    return method.getName()
        + "()."
        + getGetterForMoreDotsInBeanTable(method.getReturnType().isClass(), fieldName
            .substring(dotIndex + 1));
  }
}
origin: sk.seges.acris/acris-client-core

public static JMethod getGetter(JClassType beanType, String fieldName) throws NotFoundException {
  JMethod method = null;
  try {
    try {
      method = beanType.getMethod("get" + getterSetterDeterminator(fieldName), new JType[0]);
    } catch (NotFoundException e) {
      method = beanType.getMethod("is" + getterSetterDeterminator(fieldName), new JType[0]);
    }
  } catch (NotFoundException e) {
    JClassType superClass = beanType.getSuperclass();
    if (superClass != null) {
      try {
        method = getGetter(superClass, fieldName);
      } catch (NotFoundException e1) {
        JClassType[] interfaces = beanType.getImplementedInterfaces();
        if (interfaces != null && interfaces.length > 0) {
          for (JClassType intrface : interfaces) {
            method = getGetter(intrface, fieldName);
            if (method != null) {
              break;
            }
          }
        }
      }
    }
  }
  return method;
}
origin: sk.seges.acris/acris-widgets-beantable

JMethod setter = null;
try {
  getter = RebindUtils.getGetter(beanType, field);
  setter = RebindUtils.getSetter(beanType, field, fieldType);
} catch (NotFoundException e) {
origin: sk.seges.acris/acris-client-core

  fd.getterMethod = getGetter(beanType, fieldName);
} catch (NotFoundException e) {
origin: sk.seges.acris/acris-client-core

/**
 * Searches class and all its superclasses for a field.
 * 
 * @param classType
 * @param fieldName
 * @return field or method containing representing the field
 * @throws NotFoundException
 */
public static Object getDeclaredDirectField(JClassType classType, String fieldName)
    throws NotFoundException {
  JField field = classType.getField(fieldName);
  JClassType superClass = classType.getSuperclass();
  JMethod getter = null;
  if (field == null) {
    try {
      getter = getGetter(classType, fieldName);
    } catch (Exception e) {}
  }
  if (field == null && getter == null && superClass != null) {
    return getDeclaredDirectField(superClass, fieldName);
  }
  if (field != null) {
    return field;
  } else if (getter != null) {
    return getter;
  }
  throw new NotFoundException(
      "Unable to identify a property descriptor (field or method) for classType = " + classType
          + ", field = " + fieldName);
}
origin: sk.seges.acris/acris-binding

JMethod getter = RebindUtils.getGetter(classType, fieldName);
if (getter == null) {
sk.seges.acris.core.rebindRebindUtilsgetGetter

Javadoc

recursively calls RebindUtils#getGetter(JClassType,String) to handle "more-dots strings"
e.g.: address.street returns getAddress().getStreet

Popular methods of RebindUtils

  • getDeclaredFieldType
    Will it comment it aprox. 2 minutes before getDeclaredFieldClassType method
  • getGenericsFromInterfaceType
    Tries to find parametrized type in interface of a class.
  • getGenericsFromSuperclassType
    Same as getGenericsFromInterfaceType but it extracts generics from superclass
  • getGetterForMoreDotsInBeanTable
    recursively calls RebindUtils#getGetter(JClassType,String) to handle "more-dots strings" e.g.: addre
  • getSetter
  • getComparableMethodDeclaration
  • getDeclaredDirectField
    Searches class and all its superclasses for a field.
  • getDeclaredField
    Searches class and all its superclasses for a property.
  • getDeclaredFieldClassType
    Will it comment later :)
  • getGenericsFromInterfaceHierarchy
    Tries to find parametrized type in interface hierarchy of a class.
  • getterSetterDeterminator
    Example: for field street it will generate string Street used to construct getter/setter.
  • toFieldName
    Convert method getter/setter/isser to field name.
  • getterSetterDeterminator,
  • toFieldName

Popular in Java

  • Reading from database using SQL prepared statement
  • getExternalFilesDir (Context)
  • getSystemService (Context)
  • getResourceAsStream (ClassLoader)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • JButton (javax.swing)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now