Class JMapType


  • public final class JMapType
    extends JComponentizedType
    JType sub-class for maps.
    Since:
    1.8
    • Constructor Summary

      Constructors 
      Constructor Description
      JMapType​(java.lang.String typeName, java.lang.String instanceName, JType componentType, boolean useJava50)
      Creates an instance of a map type, of type 'mapName'.
      JMapType​(java.lang.String typeName, JType componentType, boolean useJava50)
      Creates an instance of a map type, of type 'mapName'.
    • Field Detail

      • _instanceName

        private java.lang.String _instanceName
        Name of the actual map instance to be used, e.g. java.util.ArrayList.
    • Constructor Detail

      • JMapType

        public JMapType​(java.lang.String typeName,
                        JType componentType,
                        boolean useJava50)
        Creates an instance of a map type, of type 'mapName'.
        Parameters:
        typeName - Name of the map type interface.
        componentType - Component type.
        useJava50 - True if Java 5.0 should be used.
      • JMapType

        public JMapType​(java.lang.String typeName,
                        java.lang.String instanceName,
                        JType componentType,
                        boolean useJava50)
        Creates an instance of a map type, of type 'mapName'.
        Parameters:
        typeName - Name of the map type interface.
        instanceName - Name of the actual map type instance.
        componentType - Component type.
        useJava50 - True if Java 5.0 should be used.
    • Method Detail

      • getInstanceName

        public java.lang.String getInstanceName()
        Returns the instance name of this map type.
        Returns:
        The instance name of this map type.
      • toString

        public java.lang.String toString()
        Description copied from class: JType
        Returns the String representation of this JType, which is simply the name of this type.
        Overrides:
        toString in class JType
        Returns:
        the String representation of this JType.