Class ParameterizedCompletion.Parameter

  • Enclosing interface:
    ParameterizedCompletion

    public static class ParameterizedCompletion.Parameter
    extends java.lang.Object
    A parameter passed to a parameterized Completion.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String desc  
      private boolean isEndParam  
      private java.lang.String name  
      private java.lang.Object type  
    • Constructor Summary

      Constructors 
      Constructor Description
      Parameter​(java.lang.Object type, java.lang.String name)
      Constructor.
      Parameter​(java.lang.Object type, java.lang.String name, boolean endParam)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDescription()  
      java.lang.String getName()  
      java.lang.String getType()
      Returns the type of this parameter, as a string.
      java.lang.Object getTypeObject()
      Returns the object used to describe the type of this parameter.
      boolean isEndParam()  
      void setDescription​(java.lang.String desc)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • name

        private java.lang.String name
      • type

        private java.lang.Object type
      • desc

        private java.lang.String desc
      • isEndParam

        private boolean isEndParam
    • Constructor Detail

      • Parameter

        public Parameter​(java.lang.Object type,
                         java.lang.String name)
        Constructor.
        Parameters:
        type - The type of this parameter. This may be null for languages without specific types, dynamic typing, etc. Usually you'll pass a String for this value, but you may pass any object representing a type in your language, as long as its toString() method returns a string representation of the type.
        name - The name of the parameter.
      • Parameter

        public Parameter​(java.lang.Object type,
                         java.lang.String name,
                         boolean endParam)
        Constructor.
        Parameters:
        type - The type of this parameter. This may be null for languages without specific types, dynamic typing, etc. Usually you'll pass a String for this value, but you may pass any object representing a type in your language, as long as its toString() method returns a string representation of the type.
        name - The name of the parameter.
        endParam - Whether this parameter is an "ending parameter;" that is, whether this parameter is at a logical "ending point" in the completion text. If the user types in a parameter that is an ending point, parameter completion mode terminates. Set this to true for a trailing parameter after a function call's closing ')', for example.
    • Method Detail

      • getDescription

        public java.lang.String getDescription()
      • getName

        public java.lang.String getName()
      • getType

        public java.lang.String getType()
        Returns the type of this parameter, as a string.
        Returns:
        The type of the parameter, or null for none.
      • getTypeObject

        public java.lang.Object getTypeObject()
        Returns the object used to describe the type of this parameter.
        Returns:
        The type object, or null for none.
      • isEndParam

        public boolean isEndParam()
        Returns:
        Whether this parameter is an "ending parameter;" that is, whether this parameter is at a logical "ending point" in the completion text. If the user types in a parameter that is an ending point, parameter completion mode terminates.
      • setDescription

        public void setDescription​(java.lang.String desc)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object