Package org.terasology.reflection.reflect

Examples of org.terasology.reflection.reflect.ReflectionReflectFactory$ReflectionConstructor


    PojoEntityManager entityManager;
    EntityRef entity;

    @Before
    public void setup() {
        ReflectFactory reflectFactory = new ReflectionReflectFactory();
        CopyStrategyLibrary copyStrategies = new CopyStrategyLibrary(reflectFactory);
        TypeSerializationLibrary serializationLibrary = new TypeSerializationLibrary(reflectFactory, copyStrategies);

        EntitySystemLibrary entitySystemLibrary = new EntitySystemLibrary(reflectFactory, copyStrategies, serializationLibrary);
        compLibrary = entitySystemLibrary.getComponentLibrary();
View Full Code Here


    @Before
    public void setup() {
        EntitySystemBuilder builder = new EntitySystemBuilder();

        entityManager = builder.build(moduleManager.getEnvironment(), mock(NetworkSystem.class), new ReflectionReflectFactory());
    }
View Full Code Here

        serializationLibrary.add(Vector3f.class, new Vector3fTypeHandler());
        serializationLibrary.add(Quat4f.class, new Quat4fTypeHandler());

        NetworkSystem networkSystem = mock(NetworkSystem.class);
        EntitySystemBuilder builder = new EntitySystemBuilder();
        EngineEntityManager entityManager = builder.build(moduleManager.getEnvironment(), networkSystem, new ReflectionReflectFactory());
        entityManager.getComponentLibrary().register(new SimpleUri("test", "gettersetter"), GetterSetterComponent.class);
        entityManager.getComponentLibrary().register(new SimpleUri("test", "string"), StringComponent.class);
        entityManager.getComponentLibrary().register(new SimpleUri("test", "integer"), IntegerComponent.class);
        ComponentLibrary componentLibrary = entityManager.getComponentLibrary();
        componentSerializer = new ComponentSerializer(componentLibrary, serializationLibrary);
View Full Code Here

        mockTime = mock(EngineTime.class);
        CoreRegistry.put(Time.class, mockTime);
        NetworkSystemImpl networkSystem = new NetworkSystemImpl(mockTime);
        CoreRegistry.put(NetworkSystem.class, networkSystem);
        engineEntityManager = new EntitySystemBuilder().build(CoreRegistry.get(ModuleManager.class).getEnvironment(), networkSystem, new ReflectionReflectFactory());
        CoreRegistry.put(StorageManager.class, new StorageManagerInternal(moduleManager.getEnvironment(), engineEntityManager));

        componentSystemManager = new ComponentSystemManager();
        CoreRegistry.put(ComponentSystemManager.class, componentSystemManager);
        LoadPrefabs prefabLoadStep = new LoadPrefabs();
View Full Code Here

    public void setup() {

        AssetManager assetManager = CoreRegistry.put(AssetManager.class, mock(AssetManager.class));
        when(assetManager.listLoadedAssets(AssetType.PREFAB, Prefab.class)).thenReturn(Collections.<Prefab>emptyList());
        EntitySystemBuilder builder = new EntitySystemBuilder();
        entityManager = builder.build(moduleManager.getEnvironment(), mock(NetworkSystem.class), new ReflectionReflectFactory());
        entityManager.getComponentLibrary().register(new SimpleUri("test", "gettersetter"), GetterSetterComponent.class);
        entityManager.getComponentLibrary().register(new SimpleUri("test", "string"), StringComponent.class);
        entityManager.getComponentLibrary().register(new SimpleUri("test", "integer"), IntegerComponent.class);
        worldSerializer = new WorldSerializerImpl(entityManager, new PrefabSerializer(entityManager.getComponentLibrary(), entityManager.getTypeSerializerLibrary()));
    }
View Full Code Here

        CoreRegistry.put(ComponentSystemManager.class, mock(ComponentSystemManager.class));

        blockManager = CoreRegistry.put(BlockManager.class, new BlockManagerImpl(mock(WorldAtlas.class), new DefaultBlockFamilyFactoryRegistry()));
        NetworkSystem networkSystem = mock(NetworkSystem.class);
        when(networkSystem.getMode()).thenReturn(NetworkMode.NONE);
        entityManager = builder.build(moduleManager.getEnvironment(), networkSystem, new ReflectionReflectFactory());
        worldStub = new WorldProviderCoreStub();
        worldProvider = new EntityAwareWorldProvider(worldStub, entityManager);

        plainBlock = new Block();
        blockManager.addBlockFamily(new SymmetricFamily(new BlockUri("test:plainBlock"), plainBlock), true);
View Full Code Here

    @Before
    public void setup() {
        EntitySystemBuilder builder = new EntitySystemBuilder();

        entityManager = (PojoEntityManager) builder.build(moduleManager.getEnvironment(), mock(NetworkSystem.class), new ReflectionReflectFactory());

        PrefabData protoPrefab = new PrefabData();
        protoPrefab.addComponent(new StringComponent("Test"));
        prefab = Assets.generateAsset(new AssetUri(AssetType.PREFAB, "unittest:myprefab"), protoPrefab, Prefab.class);
    }
View Full Code Here

    private PojoPrefabManager prefabManager;

    @Before
    public void setup() throws Exception {
        ModuleManager moduleManager = ModuleManagerFactory.create();
        ReflectFactory reflectFactory = new ReflectionReflectFactory();
        CopyStrategyLibrary copyStrategyLibrary = new CopyStrategyLibrary(reflectFactory);
        TypeSerializationLibrary lib = new TypeSerializationLibrary(reflectFactory, copyStrategyLibrary);
        lib.add(Vector3f.class, new Vector3fTypeHandler());
        lib.add(Quat4f.class, new Quat4fTypeHandler());
        entitySystemLibrary = new EntitySystemLibrary(reflectFactory, copyStrategyLibrary, lib);
View Full Code Here

    }

    public static void main(String[] args) {
        final List<Benchmark> benchmarks = Lists.newArrayList();

        benchmarks.add(new FieldAccessBenchmark(new ReflectionReflectFactory()));
        benchmarks.add(new FieldAccessBenchmark(new ByteCodeReflectFactory()));
        benchmarks.add(new GetterSetterAccessBenchmark(new ReflectionReflectFactory()));
        benchmarks.add(new GetterSetterAccessBenchmark(new ByteCodeReflectFactory()));
        benchmarks.add(new ConstructionBenchmark(new ReflectionReflectFactory()));
        benchmarks.add(new ConstructionBenchmark(new ByteCodeReflectFactory()));

        Benchmarks.execute(benchmarks, new PrintToConsoleCallback());

    }
View Full Code Here

    }

    @Before
    public void setup() throws Exception {
        ModuleManager moduleManager = ModuleManagerFactory.create();
        ReflectionReflectFactory reflectFactory = new ReflectionReflectFactory();
        CoreRegistry.put(ReflectFactory.class, reflectFactory);
        CopyStrategyLibrary copyStrategies = new CopyStrategyLibrary(reflectFactory);
        CoreRegistry.put(CopyStrategyLibrary.class, copyStrategies);
        CoreRegistry.put(ModuleManager.class, moduleManager);
        NodesClassLibrary nodesClassLibrary = new NodesClassLibrary(reflectFactory, copyStrategies);
View Full Code Here

TOP

Related Classes of org.terasology.reflection.reflect.ReflectionReflectFactory$ReflectionConstructor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.