Class CustomScalarType

All Implemented Interfaces:
CustomScalar, Type

public class CustomScalarType extends ScalarType implements CustomScalar
Author:
etienne-sf
  • Constructor Details

    • CustomScalarType

      public CustomScalarType(String name, CustomScalarDefinition customScalarDefinition, CommonConfiguration configuration, DocumentParser documentParser)
      Parameters:
      name - The name of the GraphQL type
      customScalarDefinition - The custom scalar implementation, as provided by the plugin's configuration. It may be null in some cases (e.g.: when the goal is to generate the schema, as there is no code generation)
      configuration - The current plugin configuration, which is accessible through an interface that extends CommonConfiguration
      documentParser - The DocumentParser that has parsed the schema, and so that contains the whole schema definition
      See Also:
  • Method Details

    • isCustomScalar

      public boolean isCustomScalar()
      Returns true if this type is a GraphQL Custom Scalar, false otherwise
      Specified by:
      isCustomScalar in interface Type
      Overrides:
      isCustomScalar in class ScalarType
    • getTargetFileName

      public String getTargetFileName(Type.TargetFileType fileType)
      Get the filename where this type must be created. Default is to return the name for the Type
      Specified by:
      getTargetFileName in interface Type
    • getClassFullName

      public String getClassFullName()
      Description copied from interface: Type
      The java class full name for this type. It may be an interface or a concrete class.
      Specified by:
      getClassFullName in interface Type
      Returns:
      The java classname is usually the name of the type. But in some case, collision my occur with the Java syntax. In this cas, this method will return a classname different from the name