Class FormatHelper
java.lang.Object
io.smallrye.graphql.schema.helper.FormatHelper
Helping with formats of dates and Numbers
- Author:
- Phillip Kruger (phillip.kruger@redhat.com)
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetDateFormatString(Annotations annotations, org.jboss.jandex.Type type) The the date format as a String This is used to add to the description in the schemastatic Optional<Transformation> getFormat(org.jboss.jandex.Type type, Annotations annotations) Get the format model object for a certain type.getNumberFormatString(Annotations annotations) The the number format (if any) as a String This is used to add to the description in the schemastatic booleanhasAnyFormatting(Annotations annotations) Test if any formatting is present.
-
Method Details
-
hasAnyFormatting
Test if any formatting is present.- Parameters:
annotations- the annotations- Returns:
- if formatting is present
-
getFormat
public static Optional<Transformation> getFormat(org.jboss.jandex.Type type, Annotations annotations) Get the format model object for a certain type.- Parameters:
type- the typeannotations- the annotations- Returns:
- Potentially a TransformInfo model
-
getNumberFormatString
The the number format (if any) as a String This is used to add to the description in the schema- Parameters:
annotations- the annotations- Returns:
- potentially a format as a String
-
getDateFormatString
The the date format as a String This is used to add to the description in the schema- Parameters:
annotations- the annotationstype- the date type- Returns:
- potentially a format as a String
-