@Implementation(WebhookDaoImpl.class) public interface WebhookDao extends Entity { @NotNull
private void init(T instance, Class<? extends RawEntity<?>> clazz) { Implementation implAnnotation = clazz.getAnnotation(Implementation.class); if (implAnnotation != null) { try { Constructor<Object> con = (Constructor<Object>) implAnnotation.value().getConstructor(clazz); implementations.add(con.newInstance(instance)); } catch (SecurityException e) { } catch (NoSuchMethodException e) { } catch (IllegalArgumentException e) { } catch (InstantiationException e) { } catch (IllegalAccessException e) { } catch (InvocationTargetException e) { } } for (Class<?> sup : clazz.getInterfaces()) { if (RawEntity.class.isAssignableFrom(sup)) { init(instance, (Class<? extends RawEntity<?>>) sup); } } }
@Implementation(JDBCResourceEntity.class) public interface JDBCResource extends Entity {
private void init(T instance, Class<? extends RawEntity<?>> clazz) { Implementation implAnnotation = clazz.getAnnotation(Implementation.class); if (implAnnotation != null) { try { Constructor<Object> con = (Constructor<Object>) implAnnotation.value().getConstructor(clazz); implementations.add(con.newInstance(instance)); } catch (SecurityException e) { } catch (NoSuchMethodException e) { } catch (IllegalArgumentException e) { } catch (InstantiationException e) { } catch (IllegalAccessException e) { } catch (InvocationTargetException e) { } } for (Class<?> sup : clazz.getInterfaces()) { if (RawEntity.class.isAssignableFrom(sup)) { init(instance, (Class<? extends RawEntity<?>>) sup); } } }
@Implementation(SonarServerEntity.class) public interface SonarServer extends Entity {
@Index(name = "age", methodNames = "getAge") }) @Implementation(PersonImpl.class) public interface Person extends Entity {