public class FieldCreator extends Object
| Constructor and Description |
|---|
FieldCreator(ReferenceCreator referenceCreator) |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(Field field,
org.jboss.jandex.Type type,
Annotations annotations) |
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 useable as a GraphQL-Field.
|
void |
setDirectives(Directives directives) |
public FieldCreator(ReferenceCreator referenceCreator)
public void setDirectives(Directives directives)
public Optional<Field> createFieldForInterface(org.jboss.jandex.MethodInfo methodInfo, Reference parentObjectReference)
methodInfo - the java methodpublic void configure(Field field, org.jboss.jandex.Type type, Annotations annotations)
public 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–2021. All rights reserved.