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

E13403-05

oracle.javatools.parser.java.v2.model
Interface SourceHasName

All Superinterfaces:
Element, SourceElement
All Known Subinterfaces:
SourceAnnotation, SourceClass, SourceDocBlockTag, SourceDocInlineTag, SourceDocTag, SourceDotExpression, SourceEnumConstant, SourceFieldVariable, SourceFormalParameter, SourceImport, SourceLocalVariable, SourceMemberVariable, SourceMethod, SourceMethodCallExpression, SourcePackage, SourceSimpleNameExpression, SourceStatementLabel, SourceTypeParameter, SourceTypeReference, SourceVariable

public interface SourceHasName
extends SourceElement

A SourceHasName has a SourceName (notice that this is a SourceToken child) child. Formerly, this was known as "Nameable".


Field Summary
 
Fields inherited from interface oracle.javatools.parser.java.v2.model.SourceElement
CHILDREN_ALL, CHILDREN_BLANKLINES, CHILDREN_COMMENTS, CHILDREN_default, CHILDREN_none, CHILDREN_REGULAR, EMPTY_ARRAY, PRINT_ALL, REFORMAT_ALL, REFORMAT_INDENT
 
Method Summary
 java.lang.String getName()
          Gets the name string from the name element.
 SourceName getNameElement()
          Gets the name symbol.
 void setName(java.lang.String name)
          Sets the name string on the name element to be the input name.
 void setNameElement(SourceName name)
          Unlinks the current name and links the input element.
 
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
 

Method Detail

getNameElement

SourceName getNameElement()
Gets the name symbol.

Returns:
The NameSymbol associated with this object. Null if none.

setNameElement

void setNameElement(SourceName name)
Unlinks the current name and links the input element.

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

getName

java.lang.String getName()
Gets the name string from the name element. Convenience.

Returns:
The name string associated with this object. Always non-null. If no name is found, the empty string is returned.

setName

void setName(java.lang.String name)
Sets the name string on the name element to be the input name. Convenience.


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

E13403-05

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