Search in sources :

Example 6 with ReflectionService

use of org.simpleflatmapper.reflect.ReflectionService in project SimpleFlatMapper by arnaudroger.

the class ReflectionServiceTest method testClassMetaCache.

@Test
public void testClassMetaCache() {
    final ReflectionService reflectionService = ReflectionService.newInstance();
    assertSame(reflectionService.getClassMeta(new TypeReference<Tuple2<String, String>>() {
    }.getType()), reflectionService.getClassMeta(new TypeReference<Tuple2<String, String>>() {
    }.getType()));
    assertNotSame(reflectionService.getClassMeta(new TypeReference<Tuple2<String, String>>() {
    }.getType()), reflectionService.getClassMeta(new TypeReference<Tuple2<String, Long>>() {
    }.getType()));
}
Also used : Tuple2(org.simpleflatmapper.tuple.Tuple2) ReflectionService(org.simpleflatmapper.reflect.ReflectionService) Test(org.junit.Test)

Aggregations

ReflectionService (org.simpleflatmapper.reflect.ReflectionService)6 Test (org.junit.Test)5 FieldMapperColumnDefinition (org.simpleflatmapper.map.property.FieldMapperColumnDefinition)2 DbFinalObject (org.simpleflatmapper.test.beans.DbFinalObject)2 Tuple2 (org.simpleflatmapper.tuple.Tuple2)2 Field (java.lang.reflect.Field)1 Method (java.lang.reflect.Method)1 URLClassLoader (java.net.URLClassLoader)1 DatastaxColumnKey (org.simpleflatmapper.datastax.DatastaxColumnKey)1 SettableDataSetterFactory (org.simpleflatmapper.datastax.impl.SettableDataSetterFactory)1 AbstractMapperFactory (org.simpleflatmapper.map.mapper.AbstractMapperFactory)1 InstantiatorDefinition (org.simpleflatmapper.reflect.InstantiatorDefinition)1 KeyTest (org.simpleflatmapper.reflect.test.KeyTest)1 DbObject (org.simpleflatmapper.test.beans.DbObject)1 DbPartialFinalObject (org.simpleflatmapper.test.beans.DbPartialFinalObject)1 LibrarySetsClassLoader (org.simpleflatmapper.test.junit.LibrarySetsClassLoader)1 SampleFieldKey (org.simpleflatmapper.test.map.SampleFieldKey)1