Class InterfaceCreator
- java.lang.Object
-
- io.smallrye.graphql.schema.creator.type.InterfaceCreator
-
public class InterfaceCreator extends Object
This creates an interface object.The interface object has fields that might reference other types that should still be created. It might also implement some interfaces that should be created.
- Author:
- Phillip Kruger (phillip.kruger@redhat.com)
-
-
Constructor Summary
Constructors Constructor Description InterfaceCreator(ReferenceCreator referenceCreator, FieldCreator fieldCreator, OperationCreator operationCreator)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddFields(Type interfaceType, org.jboss.jandex.ClassInfo classInfo, Reference reference)protected voidaddOperations(Type type, org.jboss.jandex.ClassInfo classInfo)static booleancanAddInterfaceIntoScheme(String interfaceFullName)Check if interface can be added into GraphQL schema, eg.Typecreate(org.jboss.jandex.ClassInfo classInfo, Reference reference)StringgetDirectiveLocation()protected ReferenceTypereferenceType()voidsetDirectives(Directives directives)protected Map<String,Operation>toOperations(Map<org.jboss.jandex.DotName,List<org.jboss.jandex.MethodParameterInfo>> sourceFields, Type type, org.jboss.jandex.ClassInfo classInfo)
-
-
-
Constructor Detail
-
InterfaceCreator
public InterfaceCreator(ReferenceCreator referenceCreator, FieldCreator fieldCreator, OperationCreator operationCreator)
-
-
Method Detail
-
addFields
protected void addFields(Type interfaceType, org.jboss.jandex.ClassInfo classInfo, Reference reference)
-
getDirectiveLocation
public String getDirectiveLocation()
-
canAddInterfaceIntoScheme
public static boolean canAddInterfaceIntoScheme(String interfaceFullName)
Check if interface can be added into GraphQL schema, eg. ignore java interfaces (like Serializable)- Parameters:
interfaceFullName- full name of the interface, including package name- Returns:
- true if interface can be added
-
referenceType
protected ReferenceType referenceType()
-
setDirectives
public void setDirectives(Directives directives)
-
addOperations
protected void addOperations(Type type, org.jboss.jandex.ClassInfo classInfo)
-
-