Class SourceConstruct
java.lang.Object
org.eclipse.core.runtime.PlatformObject
org.eclipse.handly.model.impl.support.Element
org.eclipse.handly.model.impl.support.SourceConstruct
- All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable,IElement,IElementImpl,IElementImplExtension,ISourceConstructImpl,ISourceConstructImplExtension,ISourceElementImpl,IElementImplSupport,IModelManager.Provider,ISourceConstructImplSupport,ISourceElementImplSupport,ISourceConstruct,ISourceElement
Provides a skeletal implementation of
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.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.handly.model.impl.IElementImplExtension
IElementImplExtension.CloseHint -
Field Summary
Fields inherited from interface org.eclipse.handly.model.impl.IElementImplExtension
CLOSE_HINT, FORCE_OPENFields inherited from interface org.eclipse.handly.model.impl.support.IElementImplSupport
NEW_ELEMENTS, NO_BODY -
Constructor Summary
ConstructorsConstructorDescriptionSourceConstruct(IElement parent, String name) Creates a handle for a source construct with the given parent element and the given name. -
Method Summary
Modifier and TypeMethodDescriptionfinal intReturns the count used to distinguish source constructs that would otherwise be equal (such as two fields with the same name in the same type).voidsetOccurrenceCount_(int occurrenceCount) Sets the occurrence count for this element.Methods inherited from class org.eclipse.handly.model.impl.support.Element
equals, getName_, getParent_, hashCode, toStringMethods inherited from class org.eclipse.core.runtime.PlatformObject
getAdapterMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.handly.model.impl.IElementImpl
equalsAndSameParentChain_, fetchChildren_, fetchChildrenOfType_, getChildrenOfType_, getHandleMemento_, getLocationUri_, getName_, getRoot_, toDisplayString_Methods inherited from interface org.eclipse.handly.model.impl.IElementImplExtension
close_, getBody_, getBody_, getChildren_Methods inherited from interface org.eclipse.handly.model.impl.support.IElementImplSupport
canEqual_, close_, findBody_, getChildrenFromBody_, getElementManager_, getModel_, newDoesNotExistException_, open_, openParent_, peekAtBody_, remove_, removing_, toString_, toStringAncestors_, toStringBody_, toStringChildren_Methods inherited from interface org.eclipse.handly.model.impl.support.IModelManager.Provider
getModelManager_Methods inherited from interface org.eclipse.handly.model.impl.ISourceConstructImpl
getParent_, getResource_Methods inherited from interface org.eclipse.handly.model.impl.support.ISourceConstructImplSupport
buildStructure_, defaultEquals_, defaultHashCode_, exists_, isOpenable_, toStringName_, validateExistence_Methods inherited from interface org.eclipse.handly.model.impl.support.ISourceElementImplSupport
getSourceElementAt_, getSourceElementAt_, getSourceElementInfo_
-
Constructor Details
-
SourceConstruct
Creates a handle for a source construct with the given parent element and the given name.- Parameters:
parent- the parent of the element (notnull)name- the name of the element, ornullif the element has no name
-
-
Method Details
-
getOccurrenceCount_
public final int getOccurrenceCount_()Description copied from interface:ISourceConstructImplExtensionReturns the count used to distinguish source constructs that would otherwise be equal (such as two fields with the same name in the same type). Numbering starts at 1 (thus the first occurrence is occurrence 1, not occurrence 0).- Specified by:
getOccurrenceCount_in interfaceISourceConstructImplExtension- Returns:
- the occurrence count for this element
-
setOccurrenceCount_
public void setOccurrenceCount_(int occurrenceCount) Description copied from interface:ISourceConstructImplExtensionSets the occurrence count for this element.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.
- Specified by:
setOccurrenceCount_in interfaceISourceConstructImplExtension- Parameters:
occurrenceCount- the occurrence count for this element (> 0)
-