Class JsonUnitHelper
- java.lang.Object
-
- com.raynigon.unit_api.jackson.annotation.JsonUnitHelper
-
public class JsonUnitHelper extends java.lang.Object
Support a simple usage of the @JsonUnit properties
-
-
Constructor Summary
Constructors Constructor Description JsonUnitHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.raynigon.unit_api.core.annotation.QuantityShape
getShape(JsonUnit jsonUnit)
Determine the value of the shape propertystatic com.raynigon.unit_api.core.units.general.IUnit<?>
getUnitInstance(JsonUnit jsonUnit)
Determine the value of the unit property
-
-
-
Method Detail
-
getShape
public static com.raynigon.unit_api.core.annotation.QuantityShape getShape(JsonUnit jsonUnit)
Determine the value of the shape property- Parameters:
jsonUnit
- the annotation which should be processed- Returns:
- the specified Shape or QuantityShape.NUMBER if no shape was specified
-
getUnitInstance
public static com.raynigon.unit_api.core.units.general.IUnit<?> getUnitInstance(JsonUnit jsonUnit)
Determine the value of the unit property- Parameters:
jsonUnit
- the annotation which should be processed- Returns:
- the name of the specified unit or null if no unit was specified
-
-