public interface Typed
Typed interface so as to
expose a consistent group of methods for examining type information| Modifier and Type | Method and Description |
|---|---|
String |
camelName()
Return the name of the type using camel notation.
|
String |
canonicalName()
Return the full name of the type.
|
Class<?> |
getType()
Return the
Class for this type |
boolean |
is(Class<?> otherType)
Return
true if this type is assignable from the other type. |
boolean |
isArray()
Return
true if this type is an array |
boolean |
isEnum()
Return
true if this type is a Java enumeration |
boolean |
isPrimitive()
Return
true if this type is a primitive type |
String |
packageName()
Return the package name for this type.
|
String |
simpleName()
Return the name of the type without any package information.
|
Class<?>[] |
superTypes()
Return this type's super types as an array of
Class instances |
Class<?>[] |
typeHierachy()
Return this type and it's super types as an array of
Class instances |
String camelName()
my.package.MyObject would have the camelName myObject.String simpleName()
my.package.MyObject would have the name MyObject.String canonicalName()
my.package.MyObject would have the name my.package.MyObject.String packageName()
my.package.MyObject would have the name my.packageClass<?>[] typeHierachy()
Class instancesboolean is(Class<?> otherType)
true if this type is assignable from the other type.boolean isArray()
true if this type is an arrayboolean isPrimitive()
true if this type is a primitive typeboolean isEnum()
true if this type is a Java enumerationCopyright © 2015. All rights reserved.