public static class ASTRewriteRule.RewriteArguments
extends java.lang.Object
ASTRewriteRule.rewrite(ASTNode, ASTRewrite, RewriteArguments)
. This class is
closely related to the ASTRewriteRule.RewritePossibilities
.Constructor and Description |
---|
RewriteArguments(int version,
ASTRewriteRule.RewritePossibilities possibilities)
Create a new rewrite argument.
|
Modifier and Type | Method and Description |
---|---|
ASTRewriteRule.RewritePossibilities |
getRewritePossibilities()
The rewrite possibilities instance upon which this argument is based.
|
int |
getVersion()
The version of the rewrite to produce by these arguments.
|
public RewriteArguments(int version, ASTRewriteRule.RewritePossibilities possibilities)
ASTRewriteRule.RewritePossibilities.getNumberOfVersions()
)
for the given RewritePossibilites argument.version
- The version, in [0, numVersions].possibilities
- The rewrite possibilities instance upon which this argument depends.java.lang.IllegalArgumentException
- If the version is negative, or greater equal to the number of versionsjava.lang.NullPointerException
- If the possibilities parameter is null.public int getVersion()
ASTRewriteRule.RewritePossibilities.getNumberOfVersions()
) for
the value of getRewritePossibilities()
.public ASTRewriteRule.RewritePossibilities getRewritePossibilities()