Example #1
0
 private ShapeFactoryCaseDef getShapeFactoryCase(Element listEntryModelElement) {
   for (ShapeFactoryCaseDef shapeFactoryCase : this.shapeFactoryDef.getCases()) {
     JavaType javaType = shapeFactoryCase.getType().resolve();
     Class<?> cl = javaType.artifact();
     if (cl.isAssignableFrom(listEntryModelElement.getClass())) {
       return shapeFactoryCase;
     }
   }
   return null;
 }
Example #2
0
 public ShapePart newShape(JavaType javaType) {
   ElementList<?> list = this.modelElement.property(this.modelProperty);
   final Class cl = javaType.artifact();
   Element element = list.insert(cl);
   return getShapePart(element);
 }