# Deprecated API

## Contents

- Deprecated Class
- Deprecated Annotation Type
- Deprecated Method
- Deprecated Constructor
- Deprecated Field
- Deprecated Property

- Deprecated Fields
  Field and Description
  DefaultTypeTransformation#EMPTY_ARGUMENTS | Empty array constant for backwards compatibility.
  DefaultTypeTransformation#ONE_NEG | BigInteger constant representing negative one, for backwards compatibility.
  ExtendedVerifier#JVM_ERROR_MESSAGE | deprecated: This constant is no longer used and will be removed in a future version.
  GroovyLexer#tokenNames | deprecated: Use VOCABULARY instead.
  GroovyParser#tokenNames | deprecated: Use VOCABULARY instead.
  GroovySystem#RUNNER_REGISTRY | Reference to the Runtime Registry to be used by the Groovy run-time system to find classes capable of running scripts
  InvocationWriter#invokeClosureMethod | deprecated: Use direct closure invocation instead
  MetaClassRegistryImpl#MODULE_META_INF_FILE | deprecated: Use ExtensionModuleScanner.MODULE_META_INF_FILE instead

- Deprecated Properties
  Property and Description
  CliBuilder#posix | To change from the default PosixParser to the GnuParser, set this to false.

- Deprecated Classes
  Class and Description
  BaseDuration Base class for date and time durations.
  BooleanClosureForMapPredicate deprecated: Use BooleanClosureForMapPredicate instead.
  BooleanClosurePredicate deprecated: Use BooleanClosurePredicate instead.
  BooleanClosureWrapper Helper class for internal use only.
  DatumDependentDuration DatumDependentDuration represents durations whose length in milliseconds cannot be determined without knowing the datum point.
  Duration Duration represents time periods which have values independent of the context.
  IndyStaticTypesMultiTypeDispatcher Multi type dispatcher for binary expression backend combining indy and static compilation
  Java10 deprecated: Use Java17 instead.
  Java16 deprecated: Use Java17 instead.
  Java8 Java 8 based functions.
  Java9 deprecated: Use Java17 instead.
  MixinASTTransformation deprecated: static mixins have been deprecated in favour of traits (trait keyword).
  ObjectUtil Binary-compatibility facade for class files compiled by Groovy 4.0.5+ (GROOVY-12257).
  ReflectorLoader Reflector creation helper historically used to define Reflector subclasses.
  TimeCategory Apply a number of methods to allow convenient Date/Time manipulation,such as:
       use (groovy.time.TimeCategory) {
           // application on numbers:
           println 1.minute.from.now
           println 10.hours.ago
  TimeDatumDependentDuration TimeDatumDuration represents a time period which results from an arithmetic operation between a TimeDuration object and a DatumDuration object
  TimeDuration TimeDuration represents time periods expressed in units of hours, minutes, seconds and milliseconds.

- Deprecated Annotation Types
  Annotation Type and Description
  Mixin Provides a mechanism for mixing in methods into a class.

- Deprecated Methods
  Method and Description
  BinaryExpressionMultiTypeDispatcher#doPrimtiveCompare(ClassNode leftType, ClassNode rightType, BinaryExpression binExp) Delegates to doPrimitiveCompare(ClassNode, ClassNode, BinaryExpression).
  ClassNode#getFieldIndex() Returns the internal field index map for fast field lookup by name.
  CompileStack#pushBooleanExpression() Because a boolean Expression may not be evaluated completely it is important to keep the registers clean.
  CompileUnit#hasClassNodeToCompile() Checks if there are any classes pending compilation.
  CompileUnit#iterateClassNodeToCompile() Returns an iterator over the names of classes pending compilation.
  CompilerConfiguration#getOutput() Gets the currently configured output writer.
  CompilerConfiguration#setOutput(PrintWriter output) Sets the output writer.
  DefaultTypeTransformation#box(boolean value) Boxes a primitive `boolean` value into a `Boolean` wrapper object.
  DefaultTypeTransformation#box(byte value) Boxes a primitive `byte` value into a `Byte` wrapper object.
  DefaultTypeTransformation#box(char value) Boxes a primitive `char` value into a `Character` wrapper object.
  DefaultTypeTransformation#box(short value) Boxes a primitive `short` value into a `Short` wrapper object.
  DefaultTypeTransformation#box(int value) Boxes a primitive `int` value into an `Integer` wrapper object.
  DefaultTypeTransformation#box(long value) Boxes a primitive `long` value into a `Long` wrapper object.
  DefaultTypeTransformation#box(float value) Boxes a primitive `float` value into a `Float` wrapper object.
  DefaultTypeTransformation#box(double value) Boxes a primitive `double` value into a `Double` wrapper object.
  DefaultTypeTransformation#castToChar(Object object) Attempts to coerce an object to a `char` value (as a Character wrapper).
  GeneralUtils#makeDescriptorWithoutReturnType(MethodNode mn) deprecated: use MethodNodeUtils#methodDescriptorWithoutReturnType(MethodNode) instead
  GenericsUtils#alignGenericTypes(GenericsType redirectGenericTypes, GenericsType parameterizedTypes, GenericsType alignmentTarget) Given a parameterized type and a generic type information, aligns actual type parameters.
  GenericsUtils#parameterizeInterfaceGenerics(ClassNode hint, ClassNode target) Interface class nodes retrieved from ClassNode.getInterfaces or ClassNode.getAllInterfaces are returned with generic type arguments.
  GroovyCategorySupport#hasCategoryInAnyThread() deprecated: use hasCategoryInCurrentThread()
  GroovyDocTool#getFile(String filename) Returns the filename component (basename) of the given path.
  GroovyDocTool#getPath(String filename) Returns the directory component of the given filename, or `"DefaultPackage"` if the file is in the default package.
  GroovyMain#processArgs(String args, PrintStream out) Processes command-line arguments using a single output stream.
  GroovySystem#isUseReflection() Indicates whether the legacy reflection-only runtime mode is enabled.
  Groovyc#makeCompileUnit() deprecated: This method is not in use anymore.
  IndyInterface#fromCache(CacheableCallSite callSite, Class sender, String methodName, int callID, Boolean safeNavigation, Boolean thisCall, Boolean spreadCall, Object dummyReceiver, Object arguments) Get the cached methodHandle. if the related methodHandle is not found in the inline cache, cache and return it.
  IndyInterface#selectMethod(CacheableCallSite callSite, Class sender, String methodName, int callID, Boolean safeNavigation, Boolean thisCall, Boolean spreadCall, Object dummyReceiver, Object arguments) Core method for indy method selection using runtime types.
  MetaClassHelper#capitalize(String property) deprecated: Use BeanUtils.capitalize instead
  MethodNode#getTypeDescriptor(boolean pretty) deprecated: use MethodNodeUtils.methodDescriptor
  MopWriter#equalParameterTypes(Parameter p1, Parameter p2) Checks if two parameter arrays are equal.
  ReferenceManager#getDefaultSoftBundle() deprecated: use ReferenceBundle.getSoftBundle
  ReferenceManager#getDefaultWeakBundle() deprecated: use ReferenceBundle.getWeakBundle
  ReturnAdder#addReturnIfNeeded(MethodNode node) Adds return statements to a method whenever an implicit return is detected.
  Sql#preCheckForNamedParams(String sql) deprecated: Use buildSqlWithIndexedProps(String) instead
  Statement#getStatementLabel() Returns the first label attached to this statement (added last by the parser), or null if no labels are present.
  StaticInvocationWriter#isPrivateBridgeMethodsCallAllowed(ClassNode receiver, ClassNode caller) deprecated: Use bridge metadata on the declaring class instead of probing outer-class nesting manually.
  StaticTypeCheckingSupport#evaluateExpression(Expression expr, CompilerConfiguration config) deprecated: Use evaluateExpression(Expression, CompilerConfiguration, GroovyClassLoader) instead
  StaticTypeCheckingSupport#findDGMMethodsByNameAndArguments(ClassNode receiver, String name, ClassNode args) deprecated: Use findDGMMethodsByNameAndArguments(ClassLoader, ClassNode, String, ClassNode[], List) instead
  StaticTypeCheckingSupport#findDGMMethodsByNameAndArguments(ClassNode receiver, String name, ClassNode args, List methods) deprecated: Use findDGMMethodsByNameAndArguments(ClassLoader, ClassNode, String, ClassNode[], List) instead
  StaticTypeCheckingSupport#findDGMMethodsForClassNode(ClassNode clazz, String name) deprecated: Use findDGMMethodsForClassNode(ClassLoader, ClassNode, String) instead
  StaticTypeCheckingSupport#findDGMMethodsForClassNode(ClassNode clazz, String name, TreeSet accumulator) deprecated: Use findDGMMethodsForClassNode(ClassLoader, ClassNode, String, TreeSet) instead
  StaticTypeCheckingVisitor#checkClosureParameters(Expression callArguments, ClassNode receiver) deprecated: this method is unused, replaced with DelegatesTo inference.
  StreamGroovyMethods#toList(Stream self) Accumulates the elements of stream into a new mutable List.
  StructuredSyntaxDocumentFilter.MultiLineRun#getDelimeterSize() deprecated: use getDelimiterSize() instead
  WriterController#getCv() Returns the ASM ClassVisitor for emitting class-level bytecode directives.
  XmlSlurper#setKeepWhitespace(boolean keepWhitespace) deprecated: use setKeepIgnorableWhitespace

- Deprecated Constructors
  Constructor and Description
  GroovyDocWriter#GroovyDocWriter(GroovyDocTool tool, OutputTool output, GroovyDocTemplateEngine templateEngine, Properties properties) deprecated: Use GroovyDocWriter(OutputTool, GroovyDocTemplateEngine, Properties)
  GroovyRootDocBuilder#GroovyRootDocBuilder(GroovyDocTool tool, String sourcepaths, List links, Properties properties) deprecated: The `tool` parameter is unused; use GroovyRootDocBuilder(String[], List, Properties) instead.
  ParameterTypes#ParameterTypes(String pt) Constructs a `ParameterTypes` from class names.