ComplexFactoryImpl complf = (ComplexFactoryImpl) c.getComponentInstanceOfType(ComplexFactory.class);
PrimitiveFactoryImpl pf = (PrimitiveFactoryImpl) c.getComponentInstanceOfType(PrimitiveFactory.class);
GeometryFactoryImpl geomFact = (GeometryFactoryImpl) c.getComponentInstanceOfType(GeometryFactory.class);
List<DirectPosition> directPositionList = new ArrayList<DirectPosition>();
directPositionList.add(geomFact.createDirectPosition(new double[] {20, 10}));
directPositionList.add(geomFact.createDirectPosition(new double[] {40, 10}));
directPositionList.add(geomFact.createDirectPosition(new double[] {50, 40}));
directPositionList.add(geomFact.createDirectPosition(new double[] {30, 50}));
directPositionList.add(geomFact.createDirectPosition(new double[] {10, 30}));
directPositionList.add(geomFact.createDirectPosition(new double[] {20, 10}));