# Deprecated API

## Contents

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

- Deprecated Fields
  Field and Description
  CliBuilder#posix | To change from the default PosixParser to the GnuParser, set this to false.
  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
  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 Interfaces
  Interface and Description
  GroovyRunner Classes which can run scripts should implement this interface.

- Deprecated Classes
  Class and Description
  AbstractASTTransformUtil deprecated: use org.codehaus.groovy.ast.tools.GeneralUtils
  CliBuilder deprecated: use `groovy.cli.picocli.CliBuilder` or CliBuilder instead.
  DateGroovyMethods deprecated: use DateUtilExtensions instead
  GroovyAssert deprecated: Use the GroovyAssert class instead
  GroovyMBean A GroovyObject facade for an underlying MBean which acts like a normal groovy object but which is actually implemented via an underlying JMX MBean.
  JUnit4Utils Java 5 code for working with JUnit 4 tests.
  LexerFrame Swing application to graphically display the tokens produced by the lexer.
  ManagedLinkedList This class provides a very simple linked list of memory managed elements.
  MixinASTTransformation deprecated: static mixins have been deprecated in favour of traits (trait keyword).
  OptionAccessor deprecated: use `groovy.cli.picocli.OptionAccessor` or OptionAccessor
  ScriptTestAdapter An adapter to make any Groovy Script class an instance of a JUnit Test
  TestNgRunner Integration code for running TestNG tests in Groovy.
  XmlNodePrinter Prints a `groovy.util.Node` (as used with `XmlParser`) including all children in XML format.
  XmlParser A helper class for parsing XML into a tree of Node instances for a simple way of processing XML.
  XmlSlurper Parse XML into a document tree that may be traversed similar to XPath expressions.

- Deprecated Annotation Types
  Annotation Type and Description
  Mixin Provides a mechanism for mixing in methods into a class.
  NotYetImplemented Method annotation used to invert test case results.

- Deprecated Methods
  Method and Description
  AbstractASTTransformation#nonGeneric(ClassNode type) deprecated: use GenericsUtils#nonGeneric
  CliBuilder#getFormatter() deprecated: This may not be available in future groovy.util.CliBuilder versions.
  CliBuilder#getParser() deprecated: This may not be available in future groovy.util.CliBuilder versions.
  CliBuilder#setFormatter(HelpFormatter formatter) deprecated: This may not be available in future groovy.util.CliBuilder versions.
  CliBuilder#setParser(CommandLineParser parser) deprecated: This may not be available in future groovy.util.CliBuilder versions.
  CompilerConfiguration#getOutput() Gets the currently configured output writer.
  CompilerConfiguration#setOutput(PrintWriter output) Sets the output writer.
  DefaultGroovyMethods#asList(Collection self) deprecated: Use the Iterable version of asList instead
  DefaultGroovyMethods#collate(List self, int size) deprecated: use the Iterable variant instead
  DefaultGroovyMethods#collate(List self, int size, int step) deprecated: use the Iterable variant instead
  DefaultGroovyMethods#collate(List self, int size, boolean keepRemainder) deprecated: use the Iterable variant instead
  DefaultGroovyMethods#collate(List self, int size, int step, boolean keepRemainder) deprecated: use the Iterable variant instead
  DefaultGroovyMethods#collect(Collection self) Iterates through this collection transforming each entry into a new value using Closure.IDENTITY as a transformer, basically returning a list of items copied from the original collection.
  DefaultGroovyMethods#collect(Collection self, Closure transform) Iterates through this collection transforming each entry into a new value using the `transform` closure returning a list of transformed values.
  DefaultGroovyMethods#collect(Collection self, Collection collector, Closure transform) Iterates through this collection transforming each value into a new value using the `transform` closure and adding it to the supplied `collector`.
  DefaultGroovyMethods#collectAll(Collection self, Closure transform) Deprecated alias for collectNested
  DefaultGroovyMethods#collectAll(Collection self, Collection collector, Closure transform) Deprecated alias for collectNested
  DefaultGroovyMethods#collectEntries(Collection self, Closure transform) deprecated: Use the Iterable version of collectEntries instead
  DefaultGroovyMethods#collectEntries(Collection self) deprecated: Use the Iterable version of collectEntries instead
  DefaultGroovyMethods#collectEntries(Collection self, Map collector, Closure transform) deprecated: Use the Iterable version of collectEntries instead
  DefaultGroovyMethods#collectEntries(Collection self, Map collector) deprecated: Use the Iterable version of collectEntries instead
  DefaultGroovyMethods#collectMany(Collection self, Closure> projection) deprecated: Use the Iterable version of collectMany instead
  DefaultGroovyMethods#collectMany(Collection self, Collection collector, Closure> projection) deprecated: Use the Iterable version of collectMany instead
  DefaultGroovyMethods#collectNested(Collection self, Collection collector, Closure transform) deprecated: Use the Iterable version of collectNested instead
  DefaultGroovyMethods#combinations(Collection self) deprecated: Use the Iterable version of combinations instead
  DefaultGroovyMethods#containsAll(Collection self, Object items) deprecated: use the Iterable variant instead
  DefaultGroovyMethods#count(Collection self, Object value) deprecated: use count(Iterable, Closure)
  DefaultGroovyMethods#count(Collection self, Closure closure) deprecated: use count(Iterable, Closure)
  DefaultGroovyMethods#countBy(Collection self, Closure closure) deprecated: Use the Iterable version of countBy instead
  DefaultGroovyMethods#disjoint(Collection left, Collection right) deprecated: use the Iterable variant instead
  DefaultGroovyMethods#eachPermutation(Collection self, Closure closure) deprecated: Use the Iterable version of eachPermutation instead
  DefaultGroovyMethods#findResult(Collection self, U defaultResult, Closure condition) Iterates through the collection calling the given closure for each item but stopping once the first non-null result is found and returning that result.
  DefaultGroovyMethods#findResult(Collection self, Closure condition) Iterates through the collection calling the given closure for each item but stopping once the first non-null result is found and returning that result.
  DefaultGroovyMethods#findResults(Collection self, Closure filteringTransform) See Also: findResults(Iterable, Closure)
  DefaultGroovyMethods#flatten(Collection self, Closure flattenUsing) deprecated: Use the Iterable version of flatten instead
  DefaultGroovyMethods#groupBy(Collection self, Closure closure) deprecated: Use the Iterable version of groupBy instead
  DefaultGroovyMethods#groupBy(Collection self, Object closures) deprecated: Use the Iterable version of groupBy instead
  DefaultGroovyMethods#groupBy(Collection self, List closures) deprecated: Use the Iterable version of groupBy instead
  DefaultGroovyMethods#join(Collection self, String separator) deprecated: Use the Iterable version of join instead
  DefaultGroovyMethods#max(Collection self) deprecated: Use the Iterable version of max instead
  DefaultGroovyMethods#max(Collection self, Closure closure) deprecated: Use the Iterable version of max instead
  DefaultGroovyMethods#max(Collection self, Comparator comparator) deprecated: Use the Iterable version of max instead
  DefaultGroovyMethods#min(Collection self) deprecated: Use the Iterable version of min instead
  DefaultGroovyMethods#min(Collection self, Comparator comparator) deprecated: Use the Iterable version of min instead
  DefaultGroovyMethods#min(Collection self, Closure closure) deprecated: Use the Iterable version of min instead
  DefaultGroovyMethods#multiply(Collection self, Number factor) deprecated: use the Iterable variant instead
  DefaultGroovyMethods#permutations(List self, Closure function) deprecated: Use the Iterable version of permutations instead
  DefaultGroovyMethods#sum(Collection self) deprecated: Use the Iterable version of sum instead
  DefaultGroovyMethods#sum(Collection self, Object initialValue) deprecated: Use the Iterable version of sum instead
  DefaultGroovyMethods#sum(Collection self, Closure closure) deprecated: Use the Iterable version of sum instead
  DefaultGroovyMethods#sum(Collection self, Object initialValue, Closure closure) deprecated: Use the Iterable version of sum instead
  DefaultGroovyMethods#toList(Collection self) deprecated: Use the Iterable version of toList instead
  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()
  GroovyClassLoader#parseClass(InputStream in, String fileName) deprecated: Prefer using methods taking a Reader rather than an InputStream to avoid wrong encoding issues.
  GroovyCollections#combinations(Collection collections) Parameters: `collections` - the given collections
  GroovyCollections#max(Collection items) deprecated: use max(Iterable)
  GroovyCollections#min(Collection items) deprecated: use min(Iterable)
  GroovyCollections#sum(Collection items) deprecated: use sum(Iterable)
  Groovyc#makeCompileUnit() deprecated: This method is not in use anymore.
  ManagedConcurrentMap.Entry#finalizeRef() deprecated: use finalizeReference
  MetaClassHelper#capitalize(String property) deprecated: Use BeanUtils.capitalize instead
  Node#getAt(QName name) Provides lookup of elements by QName.
  PropertyNode#setClosureSharedVariable(boolean inClosure) deprecated: not used anymore, has no effect
  ReferenceManager#getDefaultSoftBundle() deprecated: use ReferenceBundle.getSoftBundle
  ReferenceManager#getDefaultWeakBundle() deprecated: use ReferenceBundle.getWeakBundle
  ReturnAdder#addReturnIfNeeded(MethodNode node) deprecated: Use visitMethod(MethodNode) instead.
  Sql#preCheckForNamedParams(String sql) deprecated: Use buildSqlWithIndexedProps(String) 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.
  StaticTypeCheckingVisitor#checkGroovyStyleConstructor(ClassNode node, ClassNode arguments) Checks that a constructor style expression is valid regarding the number of arguments and the argument types.
  XmlSlurper#setKeepWhitespace(boolean keepWhitespace) deprecated: use setKeepIgnorableWhitespace
  XmlSlurper#setKeepWhitespace(boolean keepWhitespace) deprecated: use setKeepIgnorableWhitespace