类 FieldUtils

java.lang.Object
gu.sql2java.excel.utils.FieldUtils

public class FieldUtils extends Object
  • 构造器详细资料

    • FieldUtils

      public FieldUtils()
  • 方法详细资料

    • getField

      public static Field getField(Class<?> cls, String fieldName, boolean forceAccess)
      Gets an accessible Field by name, breaking scope if requested. Superclasses/interfaces will be considered.
      参数:
      cls - the Class to reflect, must not be null
      fieldName - the field name to obtain
      forceAccess - whether to break scope restrictions using the AccessibleObject.setAccessible(boolean) method. false will only match public fields.
      返回:
      the Field object
      抛出:
      IllegalArgumentException - if the class is null, or the field name is blank or empty or is matched at multiple places in the inheritance hierarchy
    • getAllInterfaces

      public static List<Class<?>> getAllInterfaces(Class<?> cls)

      Gets a List of all interfaces implemented by the given class and its superclasses.

      The order is determined by looking through each interface in turn as declared in the source file and following its hierarchy up. Then each superclass is considered in the same way. Later duplicates are ignored, so the order is maintained.

      参数:
      cls - the class to look up, may be null
      返回:
      the List of interfaces in order, null if null input