| Package | Description | 
|---|---|
| oracle.javatools.parser.java.v2 | 
 The parser API. 
 | 
| oracle.javatools.parser.java.v2.common | 
 Classes common to model implementations. 
 | 
| oracle.javatools.parser.java.v2.model | 
 The parser model API. 
 | 
| oracle.javatools.parser.java.v2.model.expression | 
 The parser model API for expressions. 
 | 
| oracle.javatools.parser.java.v2.model.statement | 
 The parser model API for statements. 
 | 
| oracle.javatools.parser.java.v2.util | 
 Various utilities for use with the parser. 
 | 
| oracle.jdeveloper.cmt | 
 The Component Model Tool, an API for manipulating Java source code. 
 | 
| oracle.jdeveloper.java.legacy | 
 Used for migrating legacy java model code to the current version. 
 | 
| oracle.jdeveloper.java.util | 
 Public utilities for use with the java model, including the parser. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
abstract SourceExpression | 
SourceFactory.createClassLiteralExpression(java.lang.String fullyQualifiedTypeName)
Create a class literal expression for the incoming type name. 
 | 
abstract SourceExpression | 
SourceFactory.createExpression(int code)  | 
SourceExpression | 
SourceFactory.createExpression(java.lang.String text)
 | 
abstract SourceExpression | 
SourceFactory.createExpressionFromText(java.lang.String text)
Attempts to create an expression with the given text. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
SourceListExpression | 
SourceFactory.createArgumentList(SourceExpression arg)
Creates an argument list with one argument. 
 | 
SourceListExpression | 
SourceFactory.createArgumentList(SourceExpression[] arguments)
Creates an argument list. 
 | 
abstract SourceArrayAccessExpression | 
SourceFactory.createArrayAccess(SourceExpression lhs,
                 SourceListExpression dereferences)
Creates an array access. 
 | 
abstract SourceListExpression | 
SourceFactory.createArrayConstant(SourceExpression[] operands)
Creates an array constant. 
 | 
abstract SourceAssertStatement | 
SourceFactory.createAssertStatement(SourceExpression condition,
                     SourceExpression output)
Creates an assert statement. 
 | 
abstract SourceAssignmentExpression | 
SourceFactory.createAssignment(int code,
                SourceExpression lhs,
                SourceExpression rhs)
Creates an assignment expression. 
 | 
SourceNewClassExpression | 
SourceFactory.createClassCreator(SourceExpression lhs,
                  SourceTypeReference type,
                  SourceListExpression arguments,
                  SourceClassBody body)
Deprecated. 
 
Use createNewClassExpression(SSSS). 
 | 
abstract SourceDoStatement | 
SourceFactory.createDoStatement(SourceExpression e,
                 SourceStatement child)
Creates a do-while statement. 
 | 
abstract SourceDotExpression | 
SourceFactory.createDotReference(SourceExpression lhs,
                  java.lang.String name)
Creates a dot reference. 
 | 
SourceListExpression | 
SourceFactory.createExpressionList(SourceExpression argument)
Creates a list expression with one element. 
 | 
abstract SourceListExpression | 
SourceFactory.createExpressionList(SourceExpression[] arguments)
Creates a list expression. 
 | 
abstract SourceExpressionStatement | 
SourceFactory.createExpressionStatement(SourceExpression e)
Creates an expression statement. 
 | 
SourceFieldDeclaration | 
SourceFactory.createFieldDeclaration(int modifiers,
                      SourceTypeReference type,
                      java.lang.String name,
                      SourceExpression initializer)
Creates a field declaration. 
 | 
SourceFieldDeclaration | 
SourceFactory.createFieldDeclaration(SourceTypeReference type,
                      java.lang.String name,
                      SourceExpression initializer)
Creates a field declaration. 
 | 
SourceFieldVariable | 
SourceFactory.createFieldVariable(int modifiers,
                   SourceTypeReference type,
                   java.lang.String name,
                   int xdimensions,
                   SourceExpression initializer)
Creates a field variable. 
 | 
SourceFieldVariable | 
SourceFactory.createFieldVariable(int modifiers,
                   SourceTypeReference type,
                   java.lang.String name,
                   SourceExpression initializer)
Creates a field variable. 
 | 
SourceFieldVariable | 
SourceFactory.createFieldVariable(SourceTypeReference type,
                   java.lang.String name,
                   SourceExpression initializer)
Creates a field variable 
 | 
abstract SourceForStatement | 
SourceFactory.createForEnhancedStatement(SourceLocalVariableDeclaration loopVarDecl,
                          SourceExpression collection,
                          SourceStatement child)
Creates an enhanced-for loop. 
 | 
SourceForStatement | 
SourceFactory.createForEnhancedStatement(SourceLocalVariable loopVariable,
                          SourceExpression collection,
                          SourceStatement child)
Creates an enhanced-for loop. 
 | 
SourceForStatement | 
SourceFactory.createForStatement(SourceExpression initialization,
                  SourceExpression condition,
                  SourceExpression update,
                  SourceStatement child)
Convenience method. 
 | 
abstract SourceForStatement | 
SourceFactory.createForStatement(SourceListExpression initializations,
                  SourceExpression condition,
                  SourceListExpression updates,
                  SourceStatement child)
Creates a traditional for loop with no variable declarators. 
 | 
abstract SourceForStatement | 
SourceFactory.createForVariableStatement(SourceLocalVariableDeclaration variables,
                          SourceExpression condition,
                          SourceListExpression updates,
                          SourceStatement child)
Creates a traditional for loop with variable declarations. 
 | 
SourceForStatement | 
SourceFactory.createForVariableStatement(SourceLocalVariable variable,
                          SourceExpression condition,
                          SourceExpression update,
                          SourceStatement child)
Convenience method. 
 | 
SourceIfStatement | 
SourceFactory.createIfElseStatement(SourceExpression e,
                     SourceStatement trueClause,
                     SourceStatement elseClause)
Creates an if-else statement. 
 | 
abstract SourceIfStatement | 
SourceFactory.createIfStatement(SourceExpression e,
                 SourceStatement child)
Creates an if statement. 
 | 
abstract SourceIfStatement | 
SourceFactory.createIfStatement(SourceExpression e,
                 SourceStatement child,
                 SourceElseClause clause)
Creates an if or an if-else statement. 
 | 
abstract SourceInfixExpression | 
SourceFactory.createInfixExpression(int code,
                     SourceExpression[] operands)
Creates an infix expression with multiple operands. 
 | 
abstract SourceInfixExpression | 
SourceFactory.createInfixExpression(int code,
                     SourceExpression lhs,
                     SourceExpression rhs)
Creates an infix expression with two operands. 
 | 
SourceInfixExpression | 
SourceFactory.createInstanceof(SourceExpression lhs,
                SourceTypeReference type)
Creates a new instanceof expression. 
 | 
abstract SourceLocalVariable | 
SourceFactory.createLocalVariable(int modifiers,
                   SourceTypeReference type,
                   java.lang.String name,
                   int xdimensions,
                   SourceExpression initializer)
Creates a local variable. 
 | 
SourceLocalVariable | 
SourceFactory.createLocalVariable(int modifiers,
                   SourceTypeReference type,
                   java.lang.String name,
                   SourceExpression initializer)
Creates a local variable. 
 | 
SourceLocalVariable | 
SourceFactory.createLocalVariable(SourceTypeReference type,
                   java.lang.String name,
                   SourceExpression initializer)
Creates a local variable 
 | 
SourceLocalVariableDeclaration | 
SourceFactory.createLocalVariableDeclaration(int modifiers,
                              SourceTypeReference type,
                              java.lang.String name,
                              SourceExpression initializer)
Creates a local variable declaration. 
 | 
SourceLocalVariableDeclaration | 
SourceFactory.createLocalVariableDeclaration(SourceTypeReference type,
                              java.lang.String name,
                              SourceExpression initializer)
Creates a local variable declaration. 
 | 
abstract SourceMethodCallExpression | 
SourceFactory.createMethodCall(SourceExpression lhs,
                SourceTypeArgument[] typeArguments,
                java.lang.String name,
                SourceListExpression arguments)
Creates a method call. 
 | 
SourceMethodCallExpression | 
SourceFactory.createMethodCall(SourceExpression lhs,
                java.lang.String name,
                SourceListExpression arguments)
Creates a method call. 
 | 
abstract SourceMethodReferenceExpression | 
SourceFactory.createMethodReferenceExpression(SourceExpression lhs,
                               SourceTypeArgument[] typeArguments,
                               java.lang.String methodName)
Create a SourceMethodReferenceExpression, valid in JDK8 and higher. 
 | 
abstract SourceNewClassExpression | 
SourceFactory.createNewClassExpression(SourceExpression lhs,
                        SourceTypeReference type,
                        SourceListExpression arguments,
                        SourceClassBody body)
Creates a class creator. 
 | 
abstract SourceQuestionExpression | 
SourceFactory.createQuestionExpression(SourceExpression one,
                        SourceExpression two,
                        SourceExpression three)
Creates a question expression. 
 | 
abstract SourceReturnStatement | 
SourceFactory.createReturnStatement(SourceExpression e)
Creates a return statement. 
 | 
abstract SourceSwitchLabel | 
SourceFactory.createSwitchCaseLabel(SourceExpression e)  | 
abstract SourceSwitchStatement | 
SourceFactory.createSwitchStatement(SourceExpression e,
                     SourceBlockStatement child)
Creates a switch statement. 
 | 
abstract SourceSynchStatement | 
SourceFactory.createSynchronizedStatement(SourceExpression e,
                           SourceBlockStatement child)
Creates a synchronized statement. 
 | 
abstract SourceThrowStatement | 
SourceFactory.createThrowStatement(SourceExpression e)
Creates a throw statement. 
 | 
abstract SourceTypecastExpression | 
SourceFactory.createTypecast(SourceTypeReference[] types,
              SourceExpression operand)
Creates an intersection typecast of two or more intersecting types. 
 | 
abstract SourceTypecastExpression | 
SourceFactory.createTypecast(SourceTypeReference type,
              SourceExpression operand)
Creates a typecast. 
 | 
abstract SourceUnaryExpression | 
SourceFactory.createUnaryExpression(int code,
                     SourceExpression operand)
Creates a unary expression. 
 | 
abstract SourceWhileStatement | 
SourceFactory.createWhileStatement(SourceExpression e,
                    SourceStatement child)
Creates a while statement. 
 | 
abstract SourceWrapperExpression | 
SourceFactory.createWrapperExpression(SourceExpression operand)
Creates a wrapper expression. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
static java.util.Collection<JavaType> | 
CommonUtilities.getTargetType(SourceExpression expression,
             java.util.Collection<JavaType> exceptions)
Given a SourceExpression, find the type that the context surrounding that
 SourceExpression expects from this SourceExpression. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
SourceExpression | 
SourceAnnotation.getArgumentAt(int i)
Gets the indicated argument. 
 | 
SourceExpression | 
SourceVariable.getInitializer()
Gets the initializer, null if none. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
FlowAnalysisListener.declareField(SourceFieldVariable sym,
            SourceExpression initializer)
Declare or define a field. 
 | 
boolean | 
FlowAnalysisListener.declareLocalVariable(SourceLocalVariable sym,
                    SourceExpression initializer)
Declare or define a local variable. 
 | 
boolean | 
FlowAnalysisListener.fieldUsed(SourceFieldVariable field,
         SourceExpression context)
Usage of a field. 
 | 
void | 
SourceVariable.setInitializer(SourceExpression expr)
Unlinks the current initializer, if any, and links the input
 element. 
 | 
| Modifier and Type | Interface and Description | 
|---|---|
interface  | 
SourceAnnotationExpression
An AnnotationExpression is a final expression representing an
 annotation that is also an expression operand (and therefore must
 be a subclass of Expression). 
 | 
interface  | 
SourceArrayAccessExpression
An ArrayAccessExpression is a final expression representing an
 array access expression. 
 | 
interface  | 
SourceAssignmentExpression
An AssignmentExpression is a final expression representing infix
 operations that are assignments. 
 | 
interface  | 
SourceDereferenceExpression
A SourceDereferenceExpression is a common base expression
 representing an operator that performs a dereference. 
 | 
interface  | 
SourceDotExpression
A DotExpression is a final expression representing a selector. 
 | 
interface  | 
SourceErrorExpression
An erroneous expression . 
 | 
interface  | 
SourceInfixExpression
An InfixExpression is a final expression representing an infix
 operation that is not an assignment. 
 | 
interface  | 
SourceIntersectionTypeExpression
Manages an intersection of multiple SourceTypeExpressions. 
 | 
interface  | 
SourceInvokeExpression
A SourceInvokeExpression is a common base expression representing
 any invocation expression. 
 | 
interface  | 
SourceLambdaExpression
Represents a lambda expression, which is an expression new in JDK8 and higher. 
 | 
interface  | 
SourceListExpression
A ListExpression is a final expression representing non-operation
 expressions that have a variable number of operands. 
 | 
interface  | 
SourceLiteralExpression
A LiteralExpression is a final expression representing a lexical
 literal. 
 | 
interface  | 
SourceMethodCallExpression
A MethodCallExpression is a final expression representing a method
 invocation or an explicit constructor invocation. 
 | 
interface  | 
SourceMethodReferenceExpression
Represents one method reference expression, which is a new expression for JDK8 and higher. 
 | 
interface  | 
SourceNewArrayExpression
An ArrayAccessExpression is a final expression representing an
 array access expression. 
 | 
interface  | 
SourceNewClassExpression
A ClassCreatorExpression is a final expression representing an
 instance creation expression. 
 | 
interface  | 
SourceOperatorExpression
An OperatorExpression is a common base expression representing a
 multi-operand expression that performs an operation. 
 | 
interface  | 
SourceQuestionExpression
A QuestionExpression is a final expression representing the ternary
 operator x? x: x. 
 | 
interface  | 
SourceSimpleNameExpression
A SimpleNameExpression is a final expression representing an
 unqualified name access. 
 | 
interface  | 
SourceTypecastExpression
A SourceTypecastExpression is a final expression representing a type
 cast. 
 | 
interface  | 
SourceTypeExpression
A TypeExpression is a final expression representing a type that is
 also an expression operand (and therefore must be a subclass of
 Expression). 
 | 
interface  | 
SourceUnaryExpression
A UnaryExpression is a final expression representing the prefix and
 postfix operators but not the typecast operator. 
 | 
interface  | 
SourceWrapperExpression
A WrapperExpression is a final expression that represents wrapping
 constructs such as parentheses and brackets. 
 | 
| Modifier and Type | Field and Description | 
|---|---|
static SourceExpression[] | 
SourceExpression.EMPTY_ARRAY  | 
| Modifier and Type | Method and Description | 
|---|---|
SourceExpression | 
SourceInvokeExpression.getArgumentAt(int i)
Equivalent to calling getArgumentList().getOperandAt( i ). 
 | 
SourceExpression | 
SourceExpression.getFirstOperand()  | 
SourceExpression | 
SourceDereferenceExpression.getLhsOperand()  | 
SourceExpression | 
SourceExpression.getOperandAt(int index)
Gets the operand at the specified index in the operand array. 
 | 
SourceExpression | 
SourceMethodReferenceExpression.getQualifier()
Get the qualifier of this method reference. 
 | 
SourceExpression | 
SourceExpression.getSecondOperand()  | 
SourceExpression | 
SourceExpression.getThirdOperand()  | 
| Modifier and Type | Method and Description | 
|---|---|
java.util.List<SourceExpression> | 
SourceExpression.getOperands()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
SourceDereferenceExpression.setLhsOperand(SourceExpression e)
Attempts to set the lhs operand for this expression. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
SourceExpression | 
SourceCompoundStatement.getControlExpression()
In a for statement, null is returned. 
 | 
SourceExpression | 
SourceSwitchLabel.getExpression()  | 
SourceExpression | 
SourceSimpleStatement.getExpression()
Valid for "return", "throw", and "assert" statements and for
 "case" labels. 
 | 
SourceExpression | 
SourceForStatement.getForCollection()
In an enhanced for loop, this is the collection expression. 
 | 
SourceExpression | 
SourceForStatement.getForConditional()
In a standard for loop, this is the condition expression. 
 | 
SourceExpression | 
SourceSimpleStatement.getOutputExpression()
Valid for "assert" statements. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
java.util.List<SourceExpression> | 
SourceForStatement.getForInitializations()
In a standard for loop with no variable declarations, these are
 the initialization terms. 
 | 
java.util.List<SourceExpression> | 
SourceForStatement.getForUpdates()
In a standard for loop, these are the update terms. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
static boolean | 
Conversions.applyAssignmentConversion(JavaType subject,
                         SourceExpression subjectExpr,
                         JavaType target,
                         boolean isConstantValue,
                         JavaProvider provider)
Deprecated. 
 
Use applyAssignmentConversion(JavaType,SourceExpression,JavaType,boolean,JavaProvider,JdkVersion) 
 | 
static boolean | 
Conversions.applyAssignmentConversion(JavaType subject,
                         SourceExpression subjectExpr,
                         JavaType target,
                         boolean isConstantValue,
                         JavaProvider provider,
                         JdkVersion jdkVersion)
JLS 5.2. 
 | 
void | 
Usages.useFieldInExpression(SourceExpression s,
                    JavaField field)
Usage of a field or enum constant in an expression. 
 | 
void | 
Usages.useLocalVariableInExpression(SourceExpression s,
                            JavaLocalVariable local)
Usage of a local variable in an expression. 
 | 
void | 
Usages.useParameterInExpression(SourceExpression s,
                        JavaLocalVariable parameter)
Usage of a method or lambda parameter in an expression. 
 | 
void | 
Usages.useTypeInExpression(SourceExpression s,
                   JavaType type)
Usage of a type in an expression that is not covered in any other
 category. 
 | 
void | 
Usages.useTypeInMethodReference(SourceExpression s,
                        JavaType type)
Usage of a type as the type of a method reference. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
SourceExpression | 
CmtValue.getExpression()
Get the SourceExpression held by this CmtValue. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
CmtComponentSource.addImports(SourceExpression SourceExpression)
Deprecated. 
 
No longer has any effect.  Use auto import support of
 underlying oracle.javatools.parser.java.v2.model.SourceFile. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
static SourceExpression | 
Jot2Utils.addArgument(SourceMethodCallExpression methodCall,
           SourceExpression sibling,
           boolean isBefore,
           java.lang.String argument)  | 
static SourceExpression[] | 
Jot2Utils.getMethodCalls(SourceBlock jCodeBlock,
              java.lang.String name)  | 
| Modifier and Type | Method and Description | 
|---|---|
static SourceExpression | 
Jot2Utils.addArgument(SourceMethodCallExpression methodCall,
           SourceExpression sibling,
           boolean isBefore,
           java.lang.String argument)  | 
static SourceExpressionStatement | 
Jot2Utils.getEnclosingStatement(SourceExpression jExpr)  | 
static boolean | 
Jot2Utils.isNull(SourceExpression expr)  | 
| Modifier and Type | Method and Description | 
|---|---|
static SourceExpression | 
SourceUtils.createAssign(SourceBlock block,
            java.lang.String lhsName,
            java.lang.String rhsText)
Adds (append) an assignment statement (=) to the block. 
 | 
static SourceExpression | 
SourceUtils.createMethodCall(SourceBlock block,
                java.lang.String lhs,
                java.lang.String methodName,
                SourceExpression[] args)
Creates an expression that is a method invocation. 
 | 
static SourceExpression | 
SourceUtils.createMethodCall(SourceBlock block,
                java.lang.String lhs,
                java.lang.String methodName,
                java.lang.String[] args)
Creates an expression that is a method invocation. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
static SourceStatement | 
SourceUtils.addAssignStatement(SourceBlock block,
                  java.lang.String lhsName,
                  SourceExpression rhsExpr)
Adds (append) an assignment statement (=) to the block. 
 | 
static SourceStatement | 
SourceUtils.addExpressionStatement(SourceBlock block,
                      SourceExpression expr)
Adds (append) an expression as a statement to the block. 
 | 
static SourceStatement | 
SourceUtils.addExpressionStatement(SourceBlock block,
                      SourceExpression expr,
                      SourceElement sibling,
                      boolean before)
Inserts an expression as a statement to the block by the specified
 sibling. 
 | 
static SourceVariableDeclaration | 
SourceUtils.addLocalVariableDeclaration(SourceBlock block,
                           java.lang.String type,
                           java.lang.String name,
                           SourceExpression initExpr)
Adds (append) a local variable declaration to the given block. 
 | 
static SourceStatement | 
SourceUtils.addMethodCallStatement(SourceBlock block,
                      java.lang.String lhs,
                      java.lang.String methodName,
                      SourceExpression[] args)
Adds a method call invocation as a statement to the block. 
 | 
static SourceExpression | 
SourceUtils.createMethodCall(SourceBlock block,
                java.lang.String lhs,
                java.lang.String methodName,
                SourceExpression[] args)
Creates an expression that is a method invocation. 
 |