org.codehaus.jackson.map.util
Class ClassUtil

java.lang.Object
  extended by org.codehaus.jackson.map.util.ClassUtil

public final class ClassUtil
extends java.lang.Object


Method Summary
static java.lang.String canBeABeanType(java.lang.Class<?> type)
           
static void checkAndFixAccess(java.lang.reflect.Member member)
          Method called to check if we can use the passed method or constructor (wrt access restriction -- public methods can be called, others usually not); and if not, if there is a work-around for the problem.
static java.util.List<java.lang.Class<?>> findSuperTypes(java.lang.Class<?> cls, java.lang.Class<?> endBefore)
          Method that will find all sub-classes and implemented interfaces of a given class or interface.
static boolean isConcrete(java.lang.Class<?> type)
          Helper method that checks if given class is a concrete one; that is, not an interface or abstract class.
static java.lang.String isLocalType(java.lang.Class<?> type)
           
static boolean isProxyType(java.lang.Class<?> type)
          Helper method used to weed out dynamic Proxy types; types that do not expose concrete method API that we could use to figure out automatic Bean (property) based serialization.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

findSuperTypes

public static java.util.List<java.lang.Class<?>> findSuperTypes(java.lang.Class<?> cls,
                                                                java.lang.Class<?> endBefore)
Method that will find all sub-classes and implemented interfaces of a given class or interface. Classes are listed in order of precedence, starting with the immediate super-class, followed by interfaces class directly declares to implemented, and then recursively followed by parent of super-class and so forth. Note that Object.class is not included in the list regardless of whether endBefore argument is defined

Parameters:
endBefore - Super-type to NOT include in results, if any; when encountered, will be ignored (and no super types are checked).

canBeABeanType

public static java.lang.String canBeABeanType(java.lang.Class<?> type)
Returns:
Null if class might be a bean; type String (that identifies why it's not a bean) if not

isLocalType

public static java.lang.String isLocalType(java.lang.Class<?> type)

isProxyType

public static boolean isProxyType(java.lang.Class<?> type)
Helper method used to weed out dynamic Proxy types; types that do not expose concrete method API that we could use to figure out automatic Bean (property) based serialization.


isConcrete

public static boolean isConcrete(java.lang.Class<?> type)
Helper method that checks if given class is a concrete one; that is, not an interface or abstract class.


checkAndFixAccess

public static void checkAndFixAccess(java.lang.reflect.Member member)
Method called to check if we can use the passed method or constructor (wrt access restriction -- public methods can be called, others usually not); and if not, if there is a work-around for the problem.