public static Class<?> getLiteral(String className, String literal) {
        LiteralAnalyzer analyzer = ANALYZERS.get( className );
        Class result = null;
        if ( analyzer != null ) {
            analyzer.validate( literal );
            result = analyzer.getLiteral();
        }
        return result;
    }
@Test
    public void testIntegerLiteralFromJLS() {

        // largest positive int: dec / octal / int / binary
        assertThat( getLiteral( int.class.getCanonicalName(), "2147483647" ) ).isNotNull();
        assertThat( getLiteral( int.class.getCanonicalName(), "2147483647" ) ).isNotNull();
        assertThat( getLiteral( int.class.getCanonicalName(), "0x7fff_ffff" ) ).isNotNull();
        assertThat( getLiteral( int.class.getCanonicalName(), "0177_7777_7777" ) ).isNotNull();
        assertThat( getLiteral( int.class.getCanonicalName(), "0b0111_1111_1111_1111_1111_1111_1111_1111" ) )
            .isNotNull();

        // most negative int: dec / octal / int / binary
        // NOTE parseInt should be changed to parseUnsignedInt in Java, than the - sign can disssapear (java8)
        // and the function will be true to what the compiler shows.
        assertThat( getLiteral( int.class.getCanonicalName(), "-2147483648" ) ).isNotNull();
        assertThat( getLiteral( int.class.getCanonicalName(), "0x8000_0000" ) ).isNotNull();
        assertThat( getLiteral( int.class.getCanonicalName(), "0200_0000_0000" ) ).isNotNull();
        assertThat( getLiteral( int.class.getCanonicalName(), "0b1000_0000_0000_0000_0000_0000_0000_0000" ) )
            .isNotNull();

        // -1 representation int: dec / octal / int / binary
        assertThat( getLiteral( int.class.getCanonicalName(), "-1" ) ).isNotNull();
        assertThat( getLiteral( int.class.getCanonicalName(), "0xffff_ffff" ) ).isNotNull();
        assertThat( getLiteral( int.class.getCanonicalName(), "0377_7777_7777" ) ).isNotNull();
        assertThat( getLiteral( int.class.getCanonicalName(), "0b1111_1111_1111_1111_1111_1111_1111_1111" ) )
            .isNotNull();

        // largest positive long: dec / octal / int / binary
        assertThat( getLiteral( long.class.getCanonicalName(), "9223372036854775807L" ) ).isNotNull();
        assertThat( getLiteral( long.class.getCanonicalName(), "0x7fff_ffff_ffff_ffffL" ) ).isNotNull();
        assertThat( getLiteral( long.class.getCanonicalName(), "07_7777_7777_7777_7777_7777L" ) ).isNotNull();
        assertThat( getLiteral( long.class.getCanonicalName(), "0b0111_1111_1111_1111_1111_1111_1111_1111_1111_1111_"
            + "1111_1111_1111_1111_1111_1111L" ) ).isNotNull();
        // most negative long: dec / octal / int / binary
        assertThat( getLiteral( long.class.getCanonicalName(), "-9223372036854775808L" ) ).isNotNull();
        assertThat( getLiteral( long.class.getCanonicalName(), "0x8000_0000_0000_0000L" ) ).isNotNull();
        assertThat( getLiteral( long.class.getCanonicalName(), "010_0000_0000_0000_0000_0000L" ) ).isNotNull();
        assertThat( getLiteral( long.class.getCanonicalName(), "0b1000_0000_0000_0000_0000_0000_0000_0000_0000_0000_"
            + "0000_0000_0000_0000_0000_0000L" ) ).isNotNull();
        // -1 representation long: dec / octal / int / binary
        assertThat( getLiteral( long.class.getCanonicalName(), "-1L" ) ).isNotNull();
        assertThat( getLiteral( long.class.getCanonicalName(), "0xffff_ffff_ffff_ffffL" ) ).isNotNull();
        assertThat( getLiteral( long.class.getCanonicalName(), "017_7777_7777_7777_7777_7777L" ) ).isNotNull();
        assertThat( getLiteral( long.class.getCanonicalName(), "0b1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_"
            + "1111_1111_1111_1111_1111_1111L" ) ).isNotNull();

        // some examples of ints
        assertThat( getLiteral( int.class.getCanonicalName(), "0" ) ).isNotNull();
        assertThat( getLiteral( int.class.getCanonicalName(), "2" ) ).isNotNull();
        assertThat( getLiteral( int.class.getCanonicalName(), "0372" ) ).isNotNull();
        //assertThat( getLiteral( int.class.getCanonicalName(), "0xDada_Cafe" ) ).isNotNull(); java8
        assertThat( getLiteral( int.class.getCanonicalName(), "1996" ) ).isNotNull();
        assertThat( getLiteral( int.class.getCanonicalName(), "0x00_FF__00_FF" ) ).isNotNull();

        // some examples of longs
        assertThat( getLiteral( long.class.getCanonicalName(), "0777l" ) ).isNotNull();
        assertThat( getLiteral( long.class.getCanonicalName(), "0x100000000L" ) ).isNotNull();
        assertThat( getLiteral( long.class.getCanonicalName(), "2_147_483_648L" ) ).isNotNull();
        assertThat( getLiteral( long.class.getCanonicalName(), "0xC0B0L" ) ).isNotNull();
    }