In the "Factory Pattern," what does the following code snippet accomplish?
public static Shape getShape(ShapeType type, float param1, float param2) {
if(type == ShapeType.CIRCLE){
return new Circle(param1);
} else if(type == ShapeType.RECTANGLE){
return new Rectangle(param1,param2);
} else if(type == ShapeType.SQUARE){
return new Square(param1);
}
return null;
}