View Javadoc

1   package com.lexicalscope.fluentreflection;
2   
3   import ch.lambdaj.function.convert.Converter;
4   
5   class ConvertObjectToClass implements Converter<Object, Class<?>> {
6       @Override
7       public Class<?> convert(final Object from) {
8           if (from == null) {
9               return null;
10          }
11          return from.getClass();
12      }
13  }