public class Name
extends java.lang.Object
Item
and related structures. Names may be shared between different levels of the item
structure in some cases (such as an element that contains only a single value, with several layers of indirection),
and this class supports name sharing while retaining the ability to modify the actual name text (necessary to avoid
name conflicts in the generated code).Modifier and Type | Field and Description |
---|---|
private boolean |
m_checked
Name checked (and possibly adjusted) for conflicts flag.
|
private boolean |
m_fixed
Flag for name fixed by user request.
|
private java.lang.String |
m_text
Actual name text.
|
Constructor and Description |
---|
Name()
Default constructor.
|
Name(Name base)
Copy constructor.
|
Name(java.lang.String name)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getText()
Get item name.
|
boolean |
isChecked()
Check if name has been checked for conflicts.
|
boolean |
isFixed()
Check if name is fixed by configuration.
|
void |
setChecked(boolean checked)
Set flag for name checked for conflicts.
|
void |
setText(java.lang.String name)
Set item name.
|
java.lang.String |
toString()
Generate printable description of name.
|
private final boolean m_fixed
private boolean m_checked
private java.lang.String m_text
public Name()
public Name(java.lang.String name)
name
- fixed name text (null
if not fixed)public Name(Name base)
base
- public boolean isFixed()
true
if fixed, false
if notpublic boolean isChecked()
ClassHolder
) to track which names have already been entered into the set of names used by a class.public void setChecked(boolean checked)
ClassHolder
) to track which names have already been entered into the set of names used by a class.checked
- public java.lang.String getText()
null
if unspecified)public void setText(java.lang.String name)
isFixed()
returns true.name
- (null
if unspecified)public java.lang.String toString()
toString
in class java.lang.Object