Class IntrospectorUtils


  • public class IntrospectorUtils
    extends java.lang.Object
    Utilities for tools to learn about the properties, events, and methods supported by a target Java Bean. It is mainly needed to avoid using Introspector class which is part of java.desktop module from java 9, thus avoiding pulling a module ( of around 10 MB ) for using a single class.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private IntrospectorUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String decapitalize​(java.lang.String name)
      Utility method to take a string and convert it to normal Java variable name capitalization.
      • Methods inherited from class java.lang.Object

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

      • IntrospectorUtils

        private IntrospectorUtils()
    • Method Detail

      • decapitalize

        public static java.lang.String decapitalize​(java.lang.String name)
        Utility method to take a string and convert it to normal Java variable name capitalization. This normally means converting the first character from upper case to lower case, but in the (unusual) special case when there is more than one character and both the first and second characters are upper case, we leave it alone.

        Thus "FooBah" becomes "fooBah" and "X" becomes "x", but "URL" stays as "URL".

        Parameters:
        name - The string to be decapitalized.
        Returns:
        The decapitalized version of the string.