Class GroovyUtil


  • public final class GroovyUtil
    extends Object
    GroovyUtil is a utility class that provides methods that are specific to the Groovy language.
    • Field Detail

      • DOTNAME_GROOVY_OBJECT

        public static final org.jboss.jandex.DotName DOTNAME_GROOVY_OBJECT
        The DotName corresponding to the GroovyObject.
      • METHOD_GET_META_CLASS_NAME

        public static final String METHOD_GET_META_CLASS_NAME
        The name of the specific method allowing to get the meta class.
        See Also:
        Constant Field Values
      • METHOD_GET_META_CLASS_DESCRIPTOR

        public static final String METHOD_GET_META_CLASS_DESCRIPTOR
        The descriptor of the method getMetaClass() in asm terminology.
    • Method Detail

      • isGroovyObject

        public static boolean isGroovyObject​(org.jboss.jandex.ClassInfo classInfo)
        Parameters:
        classInfo - the class to test.
        Returns:
        true if the given class is a Groovy object, false otherwise.
      • isGetMetaClassMethod

        public static boolean isGetMetaClassMethod​(String name,
                                                   String descriptor)
        Parameters:
        name - the name of the method to test.
        descriptor - the descriptor of the method to test in asm terminology.
        Returns:
        true if the given method name and description match with the GroovyObject.getMetaClass(), false otherwise.
      • isGroovyClass

        public static boolean isGroovyClass​(String name)
        Parameters:
        name - the full qualified name of the class to test.
        Returns:
        true if the given class is part of the groovy library, false otherwise.