com.googlecode.icegem.serialization.codegen
Class Introspector

java.lang.Object
  extended by com.googlecode.icegem.serialization.codegen.Introspector

public class Introspector
extends Object

Util

Author:
igolovach

Constructor Summary
Introspector()
           
 
Method Summary
protected static void checkClassIsAnnotationMarked(Class<?> clazz)
           
protected static void checkClassIsNotNested(Class<?> clazz)
           
protected static void checkClassIsPublic(Class<?> clazz)
           
static void checkClassIsSerialized(Class<?> clazz)
           
protected static Constructor<?> checkConstructorNoArg(Class<?> clazz)
           
protected static void checkConstructorPublic(Constructor<?> constructor)
           
protected static void checkConstructorWithoutExceptions(Constructor<?> constructor)
           
protected static void checkGetterNoArg(Method getter)
           
protected static void checkGetterPublic(Method getter)
           
protected static void checkGetterSetterTheSameType(Method getter, Method setter)
           
protected static void checkGetterWithoutExceptions(Method getter)
           
protected static void checkParentConstructor(Class<?> clazz)
          Checks if parent class (if exists) is annotated as AutoSerializable, or have parameterless public constructor .
protected static void checkSetterOneArg(Method setter)
           
protected static void checkSetterPublic(Method setter)
           
protected static void checkSetterReturnVoid(Method setter)
           
protected static void checkSetterWithoutExceptions(Method setter)
           
static List<XProperty> getProperties(Class<?> clazz)
           
protected static Map<String,Method> getPropertyGetters(Class<?> clazz)
          1) move hierarchy up 2) look for method with name 3) check @TransientGetter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Introspector

public Introspector()
Method Detail

checkClassIsSerialized

public static void checkClassIsSerialized(Class<?> clazz)
                                   throws InvalidClassException
Throws:
InvalidClassException

getProperties

public static List<XProperty> getProperties(Class<?> clazz)

checkParentConstructor

protected static void checkParentConstructor(Class<?> clazz)
                                      throws InvalidClassException
Checks if parent class (if exists) is annotated as AutoSerializable, or have parameterless public constructor .

Parameters:
clazz -
Throws:
InvalidClassException

checkGetterSetterTheSameType

protected static void checkGetterSetterTheSameType(Method getter,
                                                   Method setter)
                                            throws InvalidClassException
Throws:
InvalidClassException

checkSetterReturnVoid

protected static void checkSetterReturnVoid(Method setter)
                                     throws InvalidClassException
Throws:
InvalidClassException

checkSetterWithoutExceptions

protected static void checkSetterWithoutExceptions(Method setter)
                                            throws InvalidClassException
Throws:
InvalidClassException

checkGetterWithoutExceptions

protected static void checkGetterWithoutExceptions(Method getter)
                                            throws InvalidClassException
Throws:
InvalidClassException

getPropertyGetters

protected static Map<String,Method> getPropertyGetters(Class<?> clazz)
1) move hierarchy up 2) look for method with name 3) check @TransientGetter

Parameters:
clazz -
Returns:

checkSetterPublic

protected static void checkSetterPublic(Method setter)
                                 throws InvalidClassException
Throws:
InvalidClassException

checkSetterOneArg

protected static void checkSetterOneArg(Method setter)
                                 throws InvalidClassException
Throws:
InvalidClassException

checkGetterPublic

protected static void checkGetterPublic(Method getter)
                                 throws InvalidClassException
Throws:
InvalidClassException

checkGetterNoArg

protected static void checkGetterNoArg(Method getter)
                                throws InvalidClassException
Throws:
InvalidClassException

checkClassIsAnnotationMarked

protected static void checkClassIsAnnotationMarked(Class<?> clazz)
                                            throws InvalidClassException
Throws:
InvalidClassException

checkClassIsPublic

protected static void checkClassIsPublic(Class<?> clazz)
                                  throws InvalidClassException
Throws:
InvalidClassException

checkClassIsNotNested

protected static void checkClassIsNotNested(Class<?> clazz)
                                     throws InvalidClassException
Throws:
InvalidClassException

checkConstructorNoArg

protected static Constructor<?> checkConstructorNoArg(Class<?> clazz)
                                               throws InvalidClassException
Throws:
InvalidClassException

checkConstructorPublic

protected static void checkConstructorPublic(Constructor<?> constructor)
                                      throws InvalidClassException
Throws:
InvalidClassException

checkConstructorWithoutExceptions

protected static void checkConstructorWithoutExceptions(Constructor<?> constructor)
                                                 throws InvalidClassException
Throws:
InvalidClassException


Copyright © 2011. All Rights Reserved.