Interface TypeComputer

    • Method Detail

      • getSupportedType

        String getSupportedType()
        Returns the supported type ID of this computer.
        Returns:
        the supported type ID, registered in extension point.
      • isSupport

        default boolean isSupport​(StringLiteral literal,
                                  List<String> content)
        Quick checks if type computer is support the literal. This method explicitly calls before #computeIsValidForSupportedType(StringLiteral, List)
        Parameters:
        literal - the literal
        content - the content
        Returns:
        true, if the literal is support by computer
      • computeWithAnnotations

        default boolean computeWithAnnotations​(Collection<LiteralType> types)
        Whether to compute it or not if any annotations set. Must call it before #computeIsValidForSupportedType(StringLiteral, List) method. Method calls in addition to LiteralType.computeWithAnnotation(), so if type not need to compute with other set annotations by default, this type computer can compute it any way. Default is false to respect Literal type's settings.
        Parameters:
        types - the types from annotations
        Returns:
        true, if need to compute
      • order

        default int order()
        Order of call to compute string literal type.
        Returns:
        the order of call