# Adopting JDT Luna (4.4) mechanisms and APIs

This section describes changes that are required if you are trying to change your 4.3 plug-in to adopt the 4.4 mechanisms and APIs.

1. AST.JLS8 for Java 8 constructs

## 1. AST.JLS8 for Java 8 constructs

A new AST level `org.eclipse.jdt.core.dom.AST#JLS8` has been added for Java 8 language changes. Clients of previous AST levels are recommended to adopt the new AST level and add support for the new constructs (new ASTNode types, and new APIs on existing node types).

A few APIs in `org.eclipse.jdt.core.dom` have been deprecated and will throw an exception when called on a JLS8 AST:

- ArrayType's "componentType" property has been replaced by "elementType" and "dimensions" properties
- MethodDeclaration and VariableDeclaration's #setExtraDimensions(int) have been replaced by #extraDimensions(), which supports annotated Dimensions
- MethodDeclaration#thrownExceptions() has been replaced by #thrownExceptionTypes()

`org.eclipse.jdt.core.compiler.ReconcileContext#getAST8()` should be used were possible.

`org.eclipse.jdt.ui.SharedASTProvider#getAST(..)` now returns a JLS8 AST.