# Class CleanUpContextCore

java.lang.Object
org.eclipse.jdt.core.manipulation.CleanUpContextCore

Direct Known Subclasses:
  `CleanUpContext`

@Deprecated(forRemoval=true, since="2024-06") public class CleanUpContextCore extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Please use CleanUpContext in the future
The context that contains all information required by a clean up to create a fix.

Since:
  1.12

## Constructor Summary

Constructors
Constructor
Description
`CleanUpContextCore(ICompilationUnit unit, CompilationUnit ast)`
Deprecated.

## Method Summary

Modifier and Type
Method
Description
`CompilationUnit`
`getAST()`
Deprecated.
`ICompilationUnit`
`getCompilationUnit()`
Deprecated.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### CleanUpContextCore

@Deprecated public CleanUpContextCore(ICompilationUnit unit, CompilationUnit ast)
Deprecated.
Creates a new clean up context.

Parameters:
  `unit` - the compilation unit
  `ast` - the AST, can be `null` if `CleanUpRequirementsCore.requiresAST()` returns `false`. The AST is guaranteed to contain changes made by previous clean ups only if `CleanUpRequirementsCore.requiresFreshAST()` returns `true`.

## Method Details

### getCompilationUnit

@Deprecated public ICompilationUnit getCompilationUnit()
Deprecated.
The compilation unit to clean up.

Returns:
  the compilation unit to clean up

### getAST

@Deprecated public CompilationUnit getAST()
Deprecated.
An AST built from the compilation unit to fix.

Can be `null` if `CleanUpRequirementsCore.requiresAST()` returns `false`. The AST is guaranteed to contain changes made by previous clean ups only if `CleanUpRequirementsCore.requiresFreshAST()` returns `true`.

Clients should check the AST API level and do nothing if they are given an AST they can't handle (see `AST.apiLevel()`).

Returns:
  an AST or `null` if none required