public class FieldCreator extends ModelCreator
referenceCreator| Constructor and Description |
|---|
FieldCreator(ReferenceCreator referenceCreator) |
| Modifier and Type | Method and Description |
|---|---|
Optional<Field> |
createFieldForInterface(org.jboss.jandex.MethodInfo methodInfo,
Reference parentObjectReference)
Creates a field from a method only.
|
Optional<Field> |
createFieldForParameter(org.jboss.jandex.MethodInfo method,
short position,
org.jboss.jandex.FieldInfo fieldInfo,
Reference parentObjectReference) |
Optional<Field> |
createFieldForPojo(Direction direction,
org.jboss.jandex.FieldInfo fieldInfo,
org.jboss.jandex.MethodInfo methodInfo,
Reference parentObjectReference)
Creates a field from a field and method.
|
Optional<Field> |
createFieldForPojo(Direction direction,
org.jboss.jandex.FieldInfo fieldInfo,
Reference parentObjectReference)
Creates a field from a public field.
|
protected static boolean |
isGraphQlField(Direction direction,
org.jboss.jandex.FieldInfo fieldInfo,
org.jboss.jandex.MethodInfo methodInfo)
Checks if method and/or field are use-able as a GraphQL-Field.
|
getReferenceCreator, getReturnType, getReturnType, getTypeAutoNameStrategy, populateField, populateField, setDirectivespublic FieldCreator(ReferenceCreator referenceCreator)
public Optional<Field> createFieldForInterface(org.jboss.jandex.MethodInfo methodInfo, Reference parentObjectReference)
methodInfo - the java methodpublic Optional<Field> createFieldForPojo(Direction direction, org.jboss.jandex.FieldInfo fieldInfo, org.jboss.jandex.MethodInfo methodInfo, Reference parentObjectReference)
direction - the direction (in/out)fieldInfo - the java propertymethodInfo - the java methodpublic Optional<Field> createFieldForParameter(org.jboss.jandex.MethodInfo method, short position, org.jboss.jandex.FieldInfo fieldInfo, Reference parentObjectReference)
public Optional<Field> createFieldForPojo(Direction direction, org.jboss.jandex.FieldInfo fieldInfo, Reference parentObjectReference)
direction - the direction (in/out)fieldInfo - the java propertyprotected static boolean isGraphQlField(Direction direction, org.jboss.jandex.FieldInfo fieldInfo, org.jboss.jandex.MethodInfo methodInfo)
direction - the direction, IN if the field should be used on an input type, OUT otherwisefieldInfo - the field. If null, methodInfo must be providedmethodInfo - the method. If null, fieldInfo must be providedCopyright © 2018–2022. All rights reserved.