Class MetaClassConstant<T>

java.lang.Object
org.apache.groovy.internal.metaclass.MetaClassConstant<T>

@Incubating public final class MetaClassConstant<T> extends Object
The one and only implementation of a metaclass. INTERNAL USE ONLY.
  • Constructor Details

    • MetaClassConstant

      public MetaClassConstant(Class<T> clazz)
      Creates a constant whose meta class is a MetaClassImpl for clazz.
      Parameters:
      clazz - the class this constant describes
  • Method Details

    • getSwitchPoint

      public SwitchPoint getSwitchPoint()
      The switch point created with this constant. Nothing in this class invalidates it.
      Returns:
      the switch point created for this constant
    • getMethod

      public MetaMethod getMethod(String name, Class[] parameters)
      Selects a method by name and parameter types.
      Parameters:
      name - the method name
      parameters - the parameter types passed to MetaClassImpl.pickMethod(String, Class[])
      Returns:
      the selected meta method, or null when none matches