|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1) E13403-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SourceVariable
A SourceVariable is the syntactic (aka symbolic) representation of a java variable, including: field variables, enum constant variables, local variables, and formal parameters.
Field Summary | |
---|---|
static SourceVariable[] |
EMPTY_ARRAY
|
static int |
PRINT_DECLARATION
"type name" |
static int |
PRINT_FIELD_NAME
"name[]" |
static int |
PRINT_TYPE
"type" |
Fields inherited from interface oracle.javatools.parser.java.v2.model.SourceElement |
---|
CHILDREN_ALL, CHILDREN_BLANKLINES, CHILDREN_COMMENTS, CHILDREN_default, CHILDREN_none, CHILDREN_REGULAR, PRINT_ALL, REFORMAT_ALL, REFORMAT_INDENT |
Method Summary | |
---|---|
SourceExpression |
getInitializer()
Gets the initializer, null if none. |
SourceVariableDeclaration |
getOwningDeclaration()
Gets the owning variable declaration, null if this is a formal parameter. |
void |
separateSelf()
Extracts sibling variables so that this is the only variable on its variable declaration. |
void |
setInitializer(SourceExpression expr)
Unlinks the current initializer, if any, and links the input element. |
Methods inherited from interface oracle.javatools.parser.java.v2.model.SourceHasModifiers |
---|
addModifiers, getModifiers, getSourceAnnotations, removeModifiers, setModifiers |
Methods inherited from interface oracle.javatools.parser.java.v2.model.SourceHasName |
---|
getName, getNameElement, setName, setNameElement |
Methods inherited from interface oracle.javatools.parser.java.v2.model.SourceHasType |
---|
getSourceType, setSourceType |
Methods inherited from interface oracle.javatools.parser.java.v2.model.SourceElement |
---|
addSelf, addSelf, addSelfAfter, addSelfBefore, clearBinding, cloneSelf, compile, getBinding, getChildren, getChildren, getCompiledObject, getContainedElements, getEndOffset, getOwningFile, getOwningSourceFile, getParent, getSiblingAfter, getSiblingBefore, getSiblings, getSiblings, getStartOffset, getSymbolKind, getText, print, print, reformatSelf, removeSelf, replaceSelf, resolve, setBinding, setContext, visitSelf |
Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaVariable |
---|
getConstantValue, isVarargs |
Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaHasType |
---|
getResolvedType, getUnresolvedType |
Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaHasName |
---|
getName |
Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaHasAnnotations |
---|
getAnnotation, getAnnotations, getDeclaredAnnotation, getDeclaredAnnotations |
Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaElement |
---|
getElementKind, getFile, getModifiers, getOwner, getSourceElement, isDeprecated, isFinal, isHidden, isSourceElement, isSynthetic, printCompiledInfo |
Field Detail |
---|
static final SourceVariable[] EMPTY_ARRAY
static final int PRINT_FIELD_NAME
static final int PRINT_DECLARATION
static final int PRINT_TYPE
Method Detail |
---|
SourceExpression getInitializer()
void setInitializer(SourceExpression expr)
java.lang.IllegalStateException
- if the input element is already linked.SourceVariableDeclaration getOwningDeclaration()
Field variables (SRC_FIELD_VARIABLE) return SrcFieldDeclaration's. Formal parameters (SRC_FORMAL_PARAMETER) return null. Local variables (SRC_LOCAL_VARIABLE) return SrcLocalsDeclaration's.
void separateSelf()
int f0 = 0, f1 = 1, f2 = 2, f3 = 3, f4 = 4;Then, the result will be:
int f0 = 0, f1 = 1; int f2 = 2; int f3 = 3, f4 = 4;
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1) E13403-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |