Search in sources :

Example 1 with EnumValue

use of com.webcohesion.enunciate.modules.jackson.model.EnumValue in project enunciate by stoicflame.

the class EnumDataTypeImpl method getValues.

@Override
public List<? extends Value> getValues() {
    FacetFilter facetFilter = this.registrationContext.getFacetFilter();
    List<EnumValue> enumValues = this.typeDefinition.getEnumValues();
    ArrayList<Value> values = new ArrayList<Value>(enumValues.size());
    for (EnumValue enumValue : enumValues) {
        if (enumValue.getValue() != null) {
            if (!facetFilter.accept(enumValue)) {
                continue;
            }
            values.add(createValue(enumValue));
        }
    }
    return values;
}
Also used : FacetFilter(com.webcohesion.enunciate.facets.FacetFilter) EnumValue(com.webcohesion.enunciate.modules.jackson.model.EnumValue) Value(com.webcohesion.enunciate.api.datatype.Value) EnumValue(com.webcohesion.enunciate.modules.jackson.model.EnumValue) ArrayList(java.util.ArrayList)

Aggregations

Value (com.webcohesion.enunciate.api.datatype.Value)1 FacetFilter (com.webcohesion.enunciate.facets.FacetFilter)1 EnumValue (com.webcohesion.enunciate.modules.jackson.model.EnumValue)1 ArrayList (java.util.ArrayList)1