public class Jot2Utils
extends java.lang.Object
oracle.jdeveloper.jot.Jot2Utils
that was used for migrating
client code from old JOT to new JOT.Constructor and Description |
---|
Jot2Utils() |
Modifier and Type | Method and Description |
---|---|
static SourceExpression |
addArgument(SourceMethodCallExpression methodCall,
SourceExpression sibling,
boolean isBefore,
java.lang.String argument) |
static java.util.Collection |
getDeclaredMethods(JavaClass cls,
java.lang.String name) |
static int[] |
getDimensions(java.lang.String declaration)
Constructs a list of array dimensions.
|
static SourceExpressionStatement |
getEnclosingStatement(SourceExpression jExpr) |
static SourceExpression[] |
getMethodCalls(SourceBlock jCodeBlock,
java.lang.String name) |
static java.util.Collection |
getMethods(JavaClass cls,
java.lang.String name) |
static java.lang.String |
getMinimumReferenceName(SourceFile jFile,
java.lang.String qualifiedName) |
static java.util.Collection |
getParameterTypes(JavaMethod jMethod) |
static boolean |
isNull(SourceExpression expr) |
static boolean |
isValidClassName(java.lang.String name)
Returns
true if name is a valid Java class name. |
static boolean |
isValidIdentifier(java.lang.String name)
Returns
true if name is a valid Java identifier. |
public static java.util.Collection getMethods(JavaClass cls, java.lang.String name)
public static java.util.Collection getDeclaredMethods(JavaClass cls, java.lang.String name)
public static java.util.Collection getParameterTypes(JavaMethod jMethod)
public static boolean isNull(SourceExpression expr)
public static java.lang.String getMinimumReferenceName(SourceFile jFile, java.lang.String qualifiedName)
public static SourceExpressionStatement getEnclosingStatement(SourceExpression jExpr)
public static SourceExpression[] getMethodCalls(SourceBlock jCodeBlock, java.lang.String name)
public static SourceExpression addArgument(SourceMethodCallExpression methodCall, SourceExpression sibling, boolean isBefore, java.lang.String argument)
public static boolean isValidClassName(java.lang.String name)
true
if name
is a valid Java class name.
A class name is a sequence of identifiers with interspersed '.' tokens.name
- a string.public static boolean isValidIdentifier(java.lang.String name)
true
if name
is a valid Java identifier.name
- a string.public static final int[] getDimensions(java.lang.String declaration)
declaration
- an array declaration.declaration
.
Blank dimensions, such as String[]
, yield a zero.
An array declaration such as String[2][3][]
would produce an
array containing {2, 3, 0}
. Non literal expressions such as
method calls, object references, etc. will result in a zero dimension.