19 package org.turro.entities;
21 import org.turro.string.Strings;
22 import org.turro.annotation.ElephantControl;
23 import org.turro.elephant.context.IConstructor;
24 import org.turro.reflection.ClassNames;
25 import org.turro.reflection.Reflections;
33 public static final String
41 public static Object
getControl(String name, String entityPath) {
50 if(!Strings.isBlank(name)) {
51 for(String sclass : ClassNames.cached().byAnnotation(
ElephantControl.class.getName())) {
52 Class pclass = Reflections.check(sclass);
54 if(constructor !=
null) {
55 return Reflections.of(pclass).classes(
IConstructor.class).objects(constructor).instance();
56 }
else if(!Strings.isBlank(entityPath)) {
57 return Reflections.of(pclass).classes(String.class).objects(entityPath).instance();
59 return Reflections.of(pclass).instance();
static Object getControl(String name, String entityPath)
static final String CTRL_ATTACHMENT
static Object getControl(String name, IConstructor constructor)
static Object getControl(String name)
static Object getControl(String name, IConstructor constructor, String entityPath)