Class JCodeModel.TypeNameParser

  • Enclosing class:
    JCodeModel

    private final class JCodeModel.TypeNameParser
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int idx  
      private java.lang.String s  
    • Constructor Summary

      Constructors 
      Constructor Description
      TypeNameParser​(java.lang.String s)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private JClass parseArguments​(JClass rawType)
      Parses '<T1,T2,...,Tn>'
      private JClass parseSuffix​(JClass clazz)
      Parses additional left-associative suffixes, like type arguments and array specifiers.
      (package private) JClass parseTypeName()
      Parses a type name token T (which can be potentially of the form Tr&ly;T1,T2,...>, or "? extends/super T".)
      private void ws()
      Skips whitespaces
      • Methods inherited from class java.lang.Object

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

      • s

        private final java.lang.String s
      • idx

        private int idx
    • Constructor Detail

      • TypeNameParser

        public TypeNameParser​(java.lang.String s)
    • Method Detail

      • parseTypeName

        JClass parseTypeName()
                      throws java.lang.ClassNotFoundException
        Parses a type name token T (which can be potentially of the form Tr&ly;T1,T2,...>, or "? extends/super T".)
        Returns:
        the index of the character next to T.
        Throws:
        java.lang.ClassNotFoundException
      • parseSuffix

        private JClass parseSuffix​(JClass clazz)
                            throws java.lang.ClassNotFoundException
        Parses additional left-associative suffixes, like type arguments and array specifiers.
        Throws:
        java.lang.ClassNotFoundException
      • ws

        private void ws()
        Skips whitespaces
      • parseArguments

        private JClass parseArguments​(JClass rawType)
                               throws java.lang.ClassNotFoundException
        Parses '<T1,T2,...,Tn>'
        Returns:
        the index of the character next to '>'
        Throws:
        java.lang.ClassNotFoundException