java.lang.Object
de.edgesoft.edgeutils.ClassUtils
public class ClassUtils
extends java.lang.Object
Utilities for
Class.
Legal stuff
Copyright 2010-2020 Ekkart Kleinod ekleinod@edgesoft.de
This file is part of edgeutils.
edgeutils is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
edgeutils is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with edgeutils. If not, see http://www.gnu.org/licenses/.
- Since:
- 0.10.0
- Author:
- Ekkart Kleinod
-
Constructor Summary
Constructors Constructor Description ClassUtils() -
Method Summary
Modifier and Type Method Description static java.util.List<java.lang.reflect.Field>getDeclaredFieldsFirstAbstraction(java.lang.Class<?> theClass)Returns declared non private fields including class inheritance up to the last abstract class.static java.util.List<java.lang.reflect.Field>getDeclaredFieldsInheritance(java.lang.Class<?> theClass)Returns declared fields including class inheritance.
-
Constructor Details
-
ClassUtils
public ClassUtils()
-
-
Method Details
-
getDeclaredFieldsFirstAbstraction
public static java.util.List<java.lang.reflect.Field> getDeclaredFieldsFirstAbstraction(java.lang.Class<?> theClass)Returns declared non private fields including class inheritance up to the last abstract class.- Parameters:
theClass- the class to get the fields for- Returns:
- list of declared fields (non-private)
-
getDeclaredFieldsInheritance
public static java.util.List<java.lang.reflect.Field> getDeclaredFieldsInheritance(java.lang.Class<?> theClass)Returns declared fields including class inheritance.- Parameters:
theClass- the class to get the fields for- Returns:
- list of declared fields
-