Search in sources :

Example 1 with PropertyType

use of org.unipop.schema.property.type.PropertyType in project unipop by unipop-graph.

the class PropertyTypeFactory method init.

public static void init(List<String> types) {
    propertyTypes = new HashSet<>();
    for (String type : types) {
        try {
            PropertyType propertyType = Class.forName(type).asSubclass(PropertyType.class).newInstance();
            propertyTypes.add(propertyType);
        } catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {
            throw new IllegalArgumentException("class: '" + type + "' not found");
        }
    }
}
Also used : PropertyType(org.unipop.schema.property.type.PropertyType)

Aggregations

PropertyType (org.unipop.schema.property.type.PropertyType)1