public final class TypeUtils extends Object
MetadataType
modelModifier and Type | Method and Description |
---|---|
static String |
getAlias(Field field)
Checks the given
field for the Alias annotation. |
static Collection<Field> |
getAllFields(Class<?> declaringType)
Returns all the
Field s in the given declaringType . |
static Collection<Class<?>> |
getAllSuperClasses(Class<?> type)
Returns all the superclasses of the given
type , without including
Object |
static Collection<Field> |
getParameterFields(Class<?> declaringType)
|
public static Collection<Field> getParameterFields(Class<?> declaringType)
Field
s in the given declaringType
which are annotated
with Parameter
but also do not have the Ignore
one.
The introspection also includes parent classes.
declaringType
- the class to introspect.Collection
of fields
. May be empty but will never be null
public static Collection<Field> getAllFields(Class<?> declaringType)
declaringType
- the class to introspect.Collection
of fields
. May be empty but will never be null
public static Collection<Class<?>> getAllSuperClasses(Class<?> type)
type
, without including
Object
type
- a typepublic static String getAlias(Field field)
field
for the Alias
annotation. If present, Alias.value()
is returned. Otherwise, Field.getName()
is returned.field
- a Field
Copyright © 2018. All rights reserved.