Package viaduct.x.javaapi.codegen
Class ObjectModel
-
- All Implemented Interfaces:
public final class ObjectModel extends Record
Model representing a GraphQL object type for code generation.
-
-
Constructor Summary
Constructors Constructor Description ObjectModel()
-
Method Summary
Modifier and Type Method Description StringgetPackageName()StringgetClassName()List<String>getImplementedInterfaces()List<FieldModel>getFields()StringgetDescription()booleangetHasDescription()booleangetHasInterfaces()booleangetHasImplementsClause()Returns true if the class declaration needs an implements clause. StringgetImplementsClause()Returns the implements clause for the class declaration (without GraphQLObject, which is inherited from JavaObjectBase). -
-
Method Detail
-
getPackageName
String getPackageName()
-
getClassName
String getClassName()
-
getImplementedInterfaces
List<String> getImplementedInterfaces()
-
getFields
List<FieldModel> getFields()
-
getDescription
String getDescription()
-
getHasDescription
boolean getHasDescription()
-
getHasInterfaces
boolean getHasInterfaces()
-
getHasImplementsClause
boolean getHasImplementsClause()
Returns true if the class declaration needs an implements clause.
Since all generated object classes now extend
JavaObjectBase(which implementsGraphQLObject), an implements clause is only needed when there are additional interfaces (root type marker or user-defined interfaces).
-
getImplementsClause
String getImplementsClause()
Returns the implements clause for the class declaration (without GraphQLObject, which is inherited from JavaObjectBase). For root types, uses the appropriate marker interface. For other types, uses any implemented interfaces only.
-
-
-
-