public abstract class SourceConstruct extends Element implements ISourceConstructImplSupport
ISourceConstructImplExtension
to minimize the effort required to implement that interface. Clients might
as well implement ("mix in") ISourceConstructImplSupport
directly
if extending this class is not possible/desirable for some reason.IElementImplExtension.CloseHint
NEW_ELEMENTS, NO_BODY
CLOSE_HINT, FORCE_OPEN
Constructor and Description |
---|
SourceConstruct(IElement parent,
java.lang.String name)
Creates a handle for a source construct with the given parent element
and the given name.
|
Modifier and Type | Method and Description |
---|---|
int |
getOccurrenceCount_()
Returns the count used to distinguish source constructs that would
otherwise be equal (such as two fields with the same name in the same
type).
|
void |
setOccurrenceCount_(int occurrenceCount)
Sets the occurrence count for this element.
|
equals, getName_, getParent_, hashCode, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
buildStructure_, defaultEquals_, defaultHashCode_, exists_, isOpenable_, toStringName_, validateExistence_
checkInRange, getSourceElementAt_, getSourceElementAt_, getSourceElementInfo_
canEqual_, close_, findBody_, getChildrenFromBody_, getElementManager_, getModel_, newDoesNotExistException_, open_, openParent_, peekAtBody_, remove_, removing_, toString_, toStringAncestors_, toStringBody_, toStringChildren_
close_, getBody_, getBody_, getChildren_
getModelManager_
getParent_, getResource_
public SourceConstruct(IElement parent, java.lang.String name)
parent
- the parent of the element (not null
)name
- the name of the element, or null
if the element has no namepublic final int getOccurrenceCount_()
ISourceConstructImplExtension
getOccurrenceCount_
in interface ISourceConstructImplExtension
public void setOccurrenceCount_(int occurrenceCount)
ISourceConstructImplExtension
This method is intended to be used only when building the structure of a source file to distinguish source constructs that would otherwise be equal.
setOccurrenceCount_
in interface ISourceConstructImplExtension
occurrenceCount
- the occurrence count for this element (> 0)Copyright (c) 2014, 2020 1C-Soft LLC and others. Made available under the Eclipse Public License 2.0