Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

javax.ide.model.java.source.tree
Interface VariableT

All Superinterfaces:
HasModifiersT, HasNameT, Tree
All Known Subinterfaces:
EnumConstantT, FieldVariableT, FormalParameterT, LocalVariableT, MemberVariableT

public interface VariableT
extends Tree, HasModifiersT, HasNameT

Common supertype for field variables (and enum constant variables), local variables, and parameters.


Field Summary
static VariableT[] EMPTY_ARRAY
           
 
Method Summary
 ExpressionT getInitializer()
          Gets the initializer, null if none.
 VariableDeclT getOwningDeclaration()
          Gets the owning variable declaration, null if this is a formal parameter.
 TypeReferenceT getType()
          Gets the type reference for this element.
 void setInitializer(ExpressionT expr)
          Unlinks the current initializer, if any, and links the input element.
 void setType(TypeReferenceT type)
          Unlinks the current source type and links the input element.
 
Methods inherited from interface javax.ide.model.java.source.tree.HasModifiersT
addModifiers, getAnnotations, getModifiers, isAbstract, isFinal, isPrivate, isProtected, isPublic, isStatic, isStrictfp, removeModifiers, setModifiers
 
Methods inherited from interface javax.ide.model.java.source.tree.HasNameT
getName, getNameElement, setName, setNameElement
 
Methods inherited from interface javax.ide.model.java.source.tree.Tree
accept, addSelf, addSelf, addSelfAfter, addSelfBefore, clearProperty, cloneSelf, getChildren, getOwningFile, getParent, getPosition, getProperty, getSiblingAfter, getSiblingBefore, getSiblings, getTreeKind, isSynthetic, removeSelf, replaceSelf, setProperty
 

Field Detail

EMPTY_ARRAY

static final VariableT[] EMPTY_ARRAY
Method Detail

getInitializer

ExpressionT getInitializer()
Gets the initializer, null if none.

Returns:
This variable's initializer. Null if none was declared.

setInitializer

void setInitializer(ExpressionT expr)
Unlinks the current initializer, if any, and links the input element.

Throws:
java.lang.IllegalStateException - if the input element is already linked.

getOwningDeclaration

VariableDeclT getOwningDeclaration()
Gets the owning variable declaration, null if this is a formal parameter.

Returns:
The owning variable declaration.

 Field variables (SRC_FIELD_VARIABLE) return SrcFieldDeclaration's.
 Formal parameters (SRC_FORMAL_PARAMETER) return null.
 Local variables (SRC_LOCAL_VARIABLE) return SrcLocalsDeclaration's.
 

getType

TypeReferenceT getType()
Gets the type reference for this element.

Returns:
This element's type reference.

setType

void setType(TypeReferenceT type)
Unlinks the current source type and links the input element.

Parameters:
type - The new type reference.
Throws:
java.lang.IllegalStateException - if the input type is already linked.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

Copyright © 1997, 2010, Oracle. All rights reserved.