This document lists changes made to the Java Source API .
Fuller descriptions of all changes can be found below (follow links).
Not all deprecations are listed here, assuming that the deprecated APIs continue to essentially work. For a full deprecation list, please consult the Javadoc.
TreeUtilities.toScopeWithDisabledAccessibilityChecks method.
GeneratorUtilities.createDefaultConstructor method.
CodeStyleUtils.
SourceUtils.getDependentRoots.
WorkingCopy.resolveRewriteTarget.
GeneratorUtilities.createFromTemplate.
GeneratorUtilities.appendToAnnotationValue.
ElementHandle for type and package.
ReferencesCount support class which provides frequences of type usage in a source root.
CodeStyle supporting customization of the generated class members order and other minor formatting enhancements.
SourceUtils.waitUserActionTask.
TaskIndexingMode into JavaSourceTaskFactorys
TreePathHandle.getElementHandle.
TreeUtilities.isCompileTimeConstantExpression.
CompilationInfo.getCachedValue, CompilationInfo.putCachedValue and CompilationInfo.CacheClearPolicy.
ClassIndex.getResourcesForPackage and ClassIndex.getElementsForPackageto allow to find package usages.
GeneratorUtilities.addImports and several methods to CodeStyle to support organizing imports.
CodeStyle to support reformatting of comments.
ClassIndex to restrict search in given packages
ClassIndex.
package
These API specification versions may be used to indicate that a module requires a certain API feature in order to function. For example, if you see here a feature you need which is labelled 1.20, your manifest should contain in its main attributes the line:
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.java.source > 1.20
TreeUtilities.toScopeWithDisabledAccessibilityChecks method.
GeneratorUtilities.createDefaultConstructor method.
CodeStyleUtils.
SourceUtils.getDependentRoots.
WorkingCopy.resolveRewriteTarget.
GeneratorUtilities.createFromTemplate.
GeneratorUtilities.appendToAnnotationValue.
ElementHandle for type and package.
ReferencesCount support class which provides frequences of type usage in a source root.
CodeStyle supporting customization of the generated class members order and other minor formatting enhancements.
SourceUtils.waitUserActionTask.
TaskIndexingMode into JavaSourceTaskFactorys
TreePathHandle.getElementHandle.
TreeUtilities.isCompileTimeConstantExpression.
CompilationInfo.getCachedValue, CompilationInfo.putCachedValue and CompilationInfo.CacheClearPolicy.
ClassIndex.getResourcesForPackage and ClassIndex.getElementsForPackageto allow to find package usages.
GeneratorUtilities.addImports and several methods to CodeStyle to support organizing imports.
CodeStyle to support reformatting of comments.
ClassIndex to restrict search in given packages
ClassIndex.
package
org.netbeans.api.java.source.BuildArtifactMapper
org.netbeans.api.java.source.support.CaretAwareJavaSourceTaskFactory
TaskIndexingMode into JavaSourceTaskFactorys
org.netbeans.api.java.source.ClassIndex
ClassIndex to restrict search in given packages
org.netbeans.api.java.source.ClasspathInfo
org.netbeans.api.java.source.CodeStyle
org.netbeans.api.java.source.CodeStyleUtils
CodeStyleUtils.
org.netbeans.api.java.source.Comment
org.netbeans.api.java.source.CompilationController
org.netbeans.api.java.source.CompilationInfo
org.netbeans.api.java.source.support.EditorAwareJavaSourceTaskFactory
TaskIndexingMode into JavaSourceTaskFactorys
org.netbeans.api.java.source.ElementHandle
org.netbeans.api.java.source.ElementUtilities
org.netbeans.api.java.source.GeneratorUtilities
GeneratorUtilities.createFromTemplate.
GeneratorUtilities.appendToAnnotationValue.
org.netbeans.api.java.source.JavaParserResultTask
TaskIndexingMode into JavaSourceTaskFactorys
org.netbeans.api.java.source.JavaSource
org.netbeans.api.java.source.JavaSourceTaskFactory
TaskIndexingMode into JavaSourceTaskFactorys
org.netbeans.api.java.source.support.LookupBasedJavaSourceTaskFactory
TaskIndexingMode into JavaSourceTaskFactorys
org.netbeans.api.java.source.ModificationResult
org.netbeans.api.java.source.support.ProfileSupport
org.netbeans.api.java.source.ScanUtils
SourceUtils.waitUserActionTask.
org.netbeans.api.java.source.support.SelectionAwareJavaSourceTaskFactory
TaskIndexingMode into JavaSourceTaskFactorys
org.netbeans.api.java.source.SourceUtils
SourceUtils.getDependentRoots.
org.netbeans.api.java.source.TreeMaker
org.netbeans.api.java.source.TreePathHandle
org.netbeans.api.java.source.TreeUtilities
TreeUtilities.toScopeWithDisabledAccessibilityChecks method.
org.netbeans.api.java.source.TypeUtilities
org.netbeans.api.java.source.WorkingCopy
WorkingCopy.resolveRewriteTarget.
JavadocHelper
org.netbeans.api.java.source org.netbeans.api.java.source.matching org.netbeans.api.java.source.support; made by: dbalek
Runtime compatibility remains, compile time compatibility is
mostly preserved too. It is however recommended to upgrade
dependencies of client modules. Try running
ant fix-dependencies in your Ant module.
org.netbeans.api.java.source.TreeUtilities org.netbeans.api.java.source.ElementUtilities org.netbeans.api.java.source.SourceUtils; made by: dbalek
org.netbeans.api.java.source.TreeUtilities; made by: ralphbenjamin; issues:
#238560
TreeUtilities.toScopeWithDisabledAccessibilityChecks method.
org.netbeans.api.java.source.TreeUtilities; made by: dbalek; issues:
#234645
org.netbeans.api.java.source.TreeUtilities; made by: ralphbenjamin; issues:
#229734
GeneratorUtilities.createDefaultConstructor method.
org.netbeans.api.java.source.CompilationInfo org.netbeans.api.java.source.WorkingCopy org.netbeans.api.java.source.TreeMaker; made by: jlahoda; issues:
#229081
CodeStyleUtils.
org.netbeans.api.java.source.CodeStyleUtils; made by: ralphbenjamin; issues:
#228870
CodeStyleUtils, which helps with
conforming java names to the naming codestyle. Used for
variable naming and getter/setter names.
org.netbeans.api.java.source.support.ProfileSupport; made by: tzezula; issues:
#228384
ProfileSupport class providing utility methods for JDK 8 profiles.
ElementUtilities.findElement.
org.netbeans.api.java.source.ClassIndex; made by: jlahoda; issues:
#227607
ClassIndex.getDeclaredSymbols.
ElementUtilities.isEffectivelyFinal,
TreeMaker.TypeAnnotation, TreeMaker.LambdaExpression,
TreeMaker.addLambdaParameter, TreeMaker.insertLambdaParameter,
TreeMaker.removeLambdaParameter, TreeMaker.setLambdaBody,
TreeMaker.MemberReference and TypeUtilities.getDescriptorType.
TreeMaker.setLabel was updated to understand MemberReferences.
SourceUtils.getDependentRoots.
org.netbeans.api.java.source.SourceUtils; made by: ralphbenjamin; issues:
#223917
getDependentRoots to class SourceUtils,
that adds an option to filter non opened projects.
WorkingCopy.resolveRewriteTarget.
org.netbeans.api.java.source.WorkingCopy; made by: jlahoda; issues:
#209375
resolveRewriteTarget to class WorkingCopy,
that returns the tree into which the given tree has been rewritten.
GeneratorUtilities.createFromTemplate.
org.netbeans.api.java.source.GeneratorUtilities; made by: ralphbenjamin; issues:
#209798
createFromTemplate to class GeneratorUtilities,
which will create a new CompilationUnitTree from a template.
GeneratorUtilities.appendToAnnotationValue.
org.netbeans.api.java.source.GeneratorUtilities; made by: jlahoda; issues:
#208570
appendToAnnotationValue to class GeneratorUtilites,
which augment ModifiersTree or CompilationUnitTree with
annotation with the given attribute values.
ElementHandle for type and package.
org.netbeans.api.java.source.ElementHandle; made by: tzezula; issues:
#209082
ElementHandle for type and package from binary name.
ReferencesCount support class which provides frequences of type usage in a source root.
ReferencesCount support class which provides information how many classes on the source path (source root) are using
given type or package.
CodeStyle supporting customization of the generated class members order and other minor formatting enhancements.
CodeStyle.getClassMemberGroups, CodeStyle.getClassMemberInsertionPoint,
to support customization of the generated class members order, and CodeStyle.wrapAfterDotInChainedMethodCalls,
CodeStyle.getBlankLinesAfterAnonymousClassHeader, CodeStyle.spaceAroundAnnotationValueAssignOps
to support minor formatting enhancements.
SourceUtils.waitUserActionTask.
org.netbeans.api.java.source.ScanUtils; made by: sdedic; issues:
#207704
ScanUtils, which help to check completness of parsing data and allow to
restart processing after project scan finishes to see most complete data. Elements can be
checked using new methods
checkElement, resolveElement, findElement and findTypeElement
that throws an exception indicating the user task should be aborted and restarted later. See javadoc for more info.
TaskIndexingMode into JavaSourceTaskFactorys
org.netbeans.api.java.source.JavaParserResultTask org.netbeans.api.java.source.JavaSourceTaskFactory SelectionAwareJavaSourceTaskFactory LookupBasedJavaSourceTaskFactory EditorAwareJavaSourceTaskFactory CaretAwareJavaSourceTaskFactory; made by: tzezula; issues:
#207459
CancellableTasks created by the JavaSourceTaskFactorys are not executed during the scan to keep the semantic backward compatibility.
Constructors with the TaskIndexingMode were added into these factories to allow tasks to run during the scan.
TreePathHandle.getElementHandle.
TreePathHandle.getElementHandle that returns corresponding ElementHandle for given TreePathHandle.
TreeUtilities.isCompileTimeConstantExpression.
TreeUtilities.isCompileTimeConstantExpression that tests whether the given expression is a compile-time constant.
CompilationInfo.getCachedValue, CompilationInfo.putCachedValue and CompilationInfo.CacheClearPolicy.
CompilationInfo.getCachedValue and CompilationInfo.putCachedValue methods and
CompilationInfo.CacheClearPolicy enum so that tasks can easily store temporary data with predictable termination.
ClassIndex.getResourcesForPackage and ClassIndex.getElementsForPackageto allow to find package usages.
ClassIndex.getResourcesForPackage and ClassIndex.getElementsForPackageto allow to find package usages.
Currently the client which needs to find usages of all types declared in the package has to list the package and query usages of each type
individually which is inefficient.
GeneratorUtilities.addImports and several methods to CodeStyle to support organizing imports.
GeneratorUtilities.addImports method to add import statements for given elements to a compilation unit
in a way that complies with the rules specified in CodeStyle. Added CodeStyle.importInnerClasses,
CodeStyle.getImportGroups, and CodeStyle.separateImportGroups to specify the rules.
org.netbeans.api.java.source.SourceUtils; made by: jbecicka; issues:
#199106
SourceUtils.computeDuplicates to get code duplicates of provided expression.
org.netbeans.api.java.source.SourceUtils; made by: tzezula; issues:
#200237
SourceUtils.getJVMSignature to obtain the JVM signature for an ElementHandle.
CodeStyle to support reformatting of comments.
CodeStyle.enableBlockCommentFormatting, CodeStyle.enableJavadocFormatting,
CodeStyle.wrapCommentText, CodeStyle.wrapOneLineComments,
CodeStyle.preserveNewLinesInCommentst, CodeStyle.blankLineAfterJavadocDescription,
CodeStyle.blankLineAfterJavadocParameterDescriptions, CodeStyle.blankLineAfterJavadocReturnTag,
CodeStyle.generateParagraphTagOnBlankLines, CodeStyle.alignJavadocParameterDescriptions,
CodeStyle.alignJavadocReturnDescriptions, CodeStyle.alignJavadocExceptionDescriptions,
to support reformatting of comments.
ClassIndex to restrict search in given packages
org.netbeans.api.java.source.ClassIndex; made by: tzezula; issues:
#197194
ClassIndex to restrict search in given packages.
org.netbeans.api.java.source.TreeUtilities; made by: ralphbenjamin; issues:
#199080
TreeUtilities has a new findMethodParameterSpan(MethodTree method) method.
org.netbeans.api.java.source.TreePathHandle; made by: jlahoda; issues:
#197848
TreePathHandle has a new from(ElementHandle) method.
org.netbeans.api.java.source.JavaSource; made by: jlahoda; issues:
#119887
JavaSource.runModificationTask method works on source-less JavaSources.
org.netbeans.api.java.source.SourceUtils; made by: tzezula; issues:
#191648
isMain method into org.netbeans.api.java.source.SourceUtils which allows
check based only on index information.
org.netbeans.api.java.source.TreeMaker; made by: jlahoda
com.sun.source.tree.DisjointTypeTree renamed to com.sun.source.tree.DisjunctiveTypeTree from javac,
so adjusting TreeMaker to it. com.sun.source.tree.AnnotationTypeTree has been removed from javac and
is no longer available.
CodeStyle.alignMultilineTryResources, CodeStyle.spaceBeforeTryParen,
CodeStyle.spaceWithinTryParens, CodeStyle.wrapTryResources
TreeMaker.DisjointType, CodeStyle.Try and TreeUtilities.CLASS_TREE_KINDS
to support new language features in JDK7.
org.netbeans.api.java.source.TreeMaker; made by: jlahoda; issues:
#157760
TreeMaker.CompilationUnit(List<AnnotationTree>, ...),
TreeMaker.addPackageAnnotation, TreeMaker.insertPackageAnnotation,
TreeMaker.removePackageAnnotation to allow modification of the list of package annotations.
org.netbeans.api.java.source.TreeMaker; made by: jlahoda; issues:
#190123
TreeMaker.QualIdent(String) and TreeMaker.Type(String) method, which allow
to construct QualIdents and Types from String specification.
org.netbeans.api.java.source.TreeUtilities; made by: jlahoda; issues:
#190019
TreeUtilities.translate method, which allows
to construct new tree based on a given set of changes.
org.netbeans.api.java.source.TypeUtilities; made by: jlahoda; issues:
#104194
TypeUtilities.getTypeName method, which
allows to print type to string.
org.netbeans.api.java.source.SourceUtils; made by: dbalek; issues:
#111292
SourceUtils.getAttributeValueCompletions method, which
returns a list of completions for an annotation attribute value suggested by
annotation processors.
org.netbeans.api.java.source.TreeUtilities; made by: jlahoda; issues:
#180842
TreeUtilities.
org.netbeans.api.java.source.GeneratorUtilities; made by: jlahoda; issues:
#175020
GeneratorUtilities.copyComments method, which
copies comments from one tree to another tree.
org.netbeans.api.java.source.TreeUtilities; made by: msauer; issues:
#170373
TreeUtilities.isEnumConstant() method, which
determines whether tree represents an enum constant.
org.netbeans.api.java.source.CompilationInfo; made by: dbalek; issues:
#169970
CompilationInfo.getSourceVersion() to return the SourceVersion used by the javac compiler.
org.netbeans.api.java.source.JavaSource; made by: tzezula; issues:
#169974
org.netbeans.api.java.source.TreeMaker; made by: moonko
TreeMake.Method(..., boolean isVarArg) to allow creation of methods with variable lenght of arguments.
org.netbeans.api.java.source.Comment; made by: moonko
Comment.create(Comment.Style, String) to create new comment of any style from string.
org.netbeans.api.java.source.JavaParserResultTask org.netbeans.api.java.source.ClasspathInfo org.netbeans.api.java.source.CompilationInfo org.netbeans.api.java.source.CompilationController org.netbeans.api.java.source.ModificationResult org.netbeans.api.java.source.WorkingCopy; made by: tzezula
org.netbeans.api.java.source.CodeStyle; made by: vstejskal
CodeStyle.getDefault(FileObject), CodeStyle.getDefault(Document).
Deprecated CodeStyle.getDefault(Project).
org.netbeans.api.java.source.BuildArtifactMapper; made by: jlahoda
org.netbeans.api.java.source.TypeUtilities; made by: jlahoda
ClassIndex.
ClassIndex was added. The listener fires
events when a declared type was removed, added, changed in the ClassIndex oe when the underlaying
ClassPath was changed.
package
package for templates using scripting language.
org.netbeans.api.java.source.TypeUtilities; made by: jlahoda; issues:
#97542