public DesignInstance createDesign(ArooaElement element, ArooaContext parentContext) { switch (parentContext.getArooaType()) { case COMPONENT: return new PropertiesJobDesign(element, parentContext); case VALUE: return new PropertiesTypeDesign(element, parentContext); } throw new IllegalStateException("Unknown Type."); }