Class SignatureParser


  • public class SignatureParser
    extends java.lang.Object
    Pull parser for generic method or field signature.
    Author:
    Dennis M. Sosnoski
    • Field Detail

      • METHOD_PARAMETERS_START_EVENT

        public static final int METHOD_PARAMETERS_START_EVENT
        See Also:
        Constant Field Values
      • METHOD_PARAMETERS_END_EVENT

        public static final int METHOD_PARAMETERS_END_EVENT
        See Also:
        Constant Field Values
      • TYPE_PARAMETERS_START_EVENT

        public static final int TYPE_PARAMETERS_START_EVENT
        See Also:
        Constant Field Values
      • TYPE_PARAMETERS_END_EVENT

        public static final int TYPE_PARAMETERS_END_EVENT
        See Also:
        Constant Field Values
      • STRING_SIGNATURE

        private static final java.lang.String STRING_SIGNATURE
        See Also:
        Constant Field Values
      • OBJECT_SIGNATURE

        private static final java.lang.String OBJECT_SIGNATURE
        See Also:
        Constant Field Values
      • m_signature

        private final java.lang.String m_signature
      • m_offset

        private int m_offset
      • m_event

        private int m_event
      • m_isPrimitive

        private boolean m_isPrimitive
      • m_isParameterized

        private boolean m_isParameterized
      • m_type

        private java.lang.String m_type
    • Constructor Detail

      • SignatureParser

        public SignatureParser​(java.lang.String sig)
        Constructor.
        Parameters:
        sig - signature attribute value
    • Method Detail

      • isParameterized

        public boolean isParameterized()
        Check if type is parameterized. It is an error to call this if the current event is not TYPE_EVENT.
        Returns:
        true if parameterized type
      • isPrimitive

        public boolean isPrimitive()
        Check if type is a primitive. It is an error to call this if the current event is not TYPE_EVENT.
        Returns:
        true if primitive type
      • getEvent

        public int getEvent()
        Get current event.
        Returns:
        event
      • getType

        public java.lang.String getType()
        Get type. It is an error to call this if the current event is not TYPE_EVENT.
        Returns:
        type
      • next

        public int next()
        Get next parse event.
        Returns:
        event