@Test public void testCompile_NotAnEntity() { AgEntity<NotAnEntity> entity = new PojoEntityCompiler(Collections.emptyMap()) .compile(NotAnEntity.class, new LazyAgDataMap(compilers)); assertNotNull(entity); try { entity.getAttributes(); fail("Exception expected"); } catch (AgException e) { assertTrue(e.getMessage().startsWith("Invalid entity '"), e.getMessage()); } }
@Override public <T> AgEntity<T> compile(Class<T> type, AgDataMap dataMap) { return new LazyAgEntity<>(type, () -> doCompile(type, dataMap)); }
PojoEntityCompiler implements AgEntityCompiler { @Override public <T> AgEntity<T> compile(Class<T> type, AgDataMap dataMap) { return new LazyAgEntity<>(type, () -> doCompile(type, dataMap)); } }
PojoEntityCompiler implements AgEntityCompiler { @Override public <T> AgEntity<T> compile(Class<T> type, AgDataMap dataMap) { return new LazyAgEntity<>(type, () -> doCompile(type, dataMap)); } PojoEntityCompiler(@Inject Map<String, AgEntityOverlay> entityOverlays); }
PojoEntityCompiler implements AgEntityCompiler { @Override public <T> AgEntity<T> compile(Class<T> type, AgDataMap dataMap) { return new LazyAgEntity<>(type, () -> doCompile(type, dataMap)); } PojoEntityCompiler(@Inject Map<String, AgEntityOverlay> entityOverlays); @Override AgEntity<T> compile(Class<T> type, AgDataMap dataMap); }
PojoEntityCompiler implements AgEntityCompiler { @Override public <T> AgEntity<T> compile(Class<T> type, AgDataMap dataMap) { return new LazyAgEntity<>(type, () -> doCompile(type, dataMap)); } PojoEntityCompiler(@Inject Map<String, AgEntityOverlay> entityOverlays); @Override AgEntity<T> compile(Class<T> type, AgDataMap dataMap);  }