Search in sources :

Example 1 with JavaLangClassMetaFactoryProducer

use of org.simpleflatmapper.reflect.impl.JavaLangClassMetaFactoryProducer in project SimpleFlatMapper by arnaudroger.

the class ReflectionService method getPredifinedClassMetaFactory.

@SuppressWarnings("unchecked")
private static UnaryFactory<ReflectionService, ClassMeta<?>>[] getPredifinedClassMetaFactory() {
    final List<UnaryFactory<ReflectionService, ClassMeta<?>>> list = new ArrayList<UnaryFactory<ReflectionService, ClassMeta<?>>>();
    Consumer<UnaryFactory<ReflectionService, ClassMeta<?>>> consumer = new Consumer<UnaryFactory<ReflectionService, ClassMeta<?>>>() {

        @Override
        public void accept(UnaryFactory<ReflectionService, ClassMeta<?>> reflectionServiceClassMetaUnaryFactory) {
            list.add(reflectionServiceClassMetaUnaryFactory);
        }
    };
    new JavaLangClassMetaFactoryProducer().produce(consumer);
    ProducerServiceLoader.produceFromServiceLoader(ClassMetaFactoryProducer.class, consumer);
    return list.toArray(new UnaryFactory[0]);
}
Also used : JavaLangClassMetaFactoryProducer(org.simpleflatmapper.reflect.impl.JavaLangClassMetaFactoryProducer) Consumer(org.simpleflatmapper.util.Consumer) OptionalClassMeta(org.simpleflatmapper.reflect.meta.OptionalClassMeta) ArrayClassMeta(org.simpleflatmapper.reflect.meta.ArrayClassMeta) ObjectClassMeta(org.simpleflatmapper.reflect.meta.ObjectClassMeta) TupleClassMeta(org.simpleflatmapper.reflect.meta.TupleClassMeta) FastTupleClassMeta(org.simpleflatmapper.reflect.meta.FastTupleClassMeta) ClassMeta(org.simpleflatmapper.reflect.meta.ClassMeta) MapClassMeta(org.simpleflatmapper.reflect.meta.MapClassMeta) UnaryFactory(org.simpleflatmapper.util.UnaryFactory)

Aggregations

JavaLangClassMetaFactoryProducer (org.simpleflatmapper.reflect.impl.JavaLangClassMetaFactoryProducer)1 ArrayClassMeta (org.simpleflatmapper.reflect.meta.ArrayClassMeta)1 ClassMeta (org.simpleflatmapper.reflect.meta.ClassMeta)1 FastTupleClassMeta (org.simpleflatmapper.reflect.meta.FastTupleClassMeta)1 MapClassMeta (org.simpleflatmapper.reflect.meta.MapClassMeta)1 ObjectClassMeta (org.simpleflatmapper.reflect.meta.ObjectClassMeta)1 OptionalClassMeta (org.simpleflatmapper.reflect.meta.OptionalClassMeta)1 TupleClassMeta (org.simpleflatmapper.reflect.meta.TupleClassMeta)1 Consumer (org.simpleflatmapper.util.Consumer)1 UnaryFactory (org.simpleflatmapper.util.UnaryFactory)1