Deprecated API
Contents
-
Terminally Deprecated ElementsElementDescriptionYou shouldn't call this method because it is inherently unreliable.Use #parameterizeType insteadThis constant is no longer used and will be removed in a future version.Use
BooleanClosureForMapPredicateinstead.UseBooleanClosurePredicateinstead.UseBooleanClosureWrapperinstead.UseBeanUtils.capitalize(java.lang.String)insteadsince 5.0.0since 5.0.0this method is unused, replaced withDelegatesToinference.UseJava17instead. Groovy 6.0 requires JDK 17+.UseJava17instead. Groovy 6.0 requires JDK 17+.UseJava17instead. Groovy 6.0 requires JDK 17+.UseJava17instead. Groovy 6.0 requires JDK 17+.
-
Deprecated ClassesClassDescriptionSuperseded by the quirk-free DSLs:
org.apache.groovy.dateutil.TimeCategory(and itsjava.util.Date-based duration classes) ororg.apache.groovy.datetime.TimeCategory(producingjava.timetypes). This legacy class is retained, unchanged, for backward compatibility.Superseded byorg.apache.groovy.dateutil.DatumDependentDuration(the dequirkedjava.util.Dateflavor) orjava.time.Period. This legacy class is retained, unchanged, for backward compatibility.Superseded byorg.apache.groovy.dateutil.Duration(the dequirkedjava.util.Dateflavor) orjava.time.Duration/java.time.Period. This legacy class is retained, unchanged, for backward compatibility.Use one of the quirk-free replacements instead:org.apache.groovy.datetime.TimeCategory(producesjava.timetypes) ororg.apache.groovy.dateutil.TimeCategory(producesjava.util.Date). This legacy category is retained, unchanged, for backward compatibility.Superseded byorg.apache.groovy.dateutil.TimeDatumDependentDuration(the dequirkedjava.util.Dateflavor) or thejava.timeDSL inorg.apache.groovy.datetime.TimeCategory. This legacy class is retained, unchanged, for backward compatibility.Superseded byorg.apache.groovy.dateutil.TimeDuration(the dequirkedjava.util.Dateflavor) orjava.time.Duration. This legacy class is retained, unchanged, for backward compatibility.static mixins have been deprecated in favour of traits (trait keyword).Since 6.0.0, useStaticTypesBinaryExpressionMultiTypeDispatcherinstead; indy array access is no longer used in static compilation.UseBooleanClosureForMapPredicateinstead.UseBooleanClosurePredicateinstead.UseBooleanClosureWrapperinstead.UseJava17instead. Groovy 6.0 requires JDK 17+.UseJava17instead. Groovy 6.0 requires JDK 17+.UseJava17instead. Groovy 6.0 requires JDK 17+.UseJava17instead. Groovy 6.0 requires JDK 17+.
-
Deprecated Annotation InterfacesAnnotation InterfaceDescriptionStatic mixins have been deprecated in favour of traits.
-
Deprecated FieldsFieldDescriptionUse
GroovyLexer.VOCABULARYinstead.UseGroovyParser.VOCABULARYinstead.Use direct closure invocation insteadThis constant is no longer used and will be removed in a future version.UseExtensionModuleScanner.MODULE_META_INF_FILEinsteadsince 5.0.0since 5.0.0
-
Deprecated MethodsMethodDescriptionthis flag is retained for compatibilityUse
Sql.buildSqlWithIndexedProps(String)insteaduse setKeepIgnorableWhitespaceThis method is not in use anymore. UseGroovyc.makeCompileUnit(GroovyClassLoader)instead.for removal since 5.0.0; useClassNode.getField(String)orClassNode.getDeclaredField(String)insteadUseCompileUnit.getClassesToCompile()insteadUseCompileUnit.getClassesToCompile()insteadUseStatement.getStatementLabels()instead for access to all labelsuse MethodNodeUtils#methodDescriptorWithoutReturnType(MethodNode) insteadYou shouldn't call this method because it is inherently unreliable.Use #parameterizeType insteadUseCompileStack.pushState()directly.Use bridge metadata on the declaring class instead of probing outer-class nesting manually.org.codehaus.groovy.classgen.asm.util.LoggableTextifier.visitMethodInsn(int, String, String, String) UseWriterController.getClassVisitor()instead for clarityUseReturnAdder.visitMethod(MethodNode)instead.not used anymorenot used anymore, has no effectUseBeanUtils.capitalize(java.lang.String)insteadsince 6.0.0; the nativeStream.toList()(JDK 16+) shadows this and returns an unmodifiable list. If you need a mutable list, callStreamGroovyMethods.toMutableList(Stream); otherwise usestream.toList()directly (faster than this extension because it skips theCollectorspath).since 2.3.0 - Java's auto-boxing is sufficient for this operationsince 2.3.0 - Java's auto-boxing is sufficient for this operationsince 2.3.0 - Java's auto-boxing is sufficient for this operationsince 2.3.0 - Java's auto-boxing is sufficient for this operationsince 2.3.0 - Java's auto-boxing is sufficient for this operationsince 2.3.0 - Java's auto-boxing is sufficient for this operationsince 2.3.0 - Java's auto-boxing is sufficient for this operationsince 2.3.0 - Java's auto-boxing is sufficient for this operationsince 2.3.0 - useShortTypeHandling.castToChar(Object)insteadthis method is unused, replaced withDelegatesToinference.Use the new bootHandle-based approach instead.Use the new bootHandle-based approach instead.
-
Deprecated ConstructorsConstructorDescriptionUse
ParameterTypes(Class[])insteadThetoolparameter is unused; useGroovyRootDocBuilder(String[], List, Properties)instead.
-
Deprecated Enum Constants
ClassNode.getField(String)orClassNode.getDeclaredField(String)instead