Interface ISourceConstructImplSupport
-
- All Superinterfaces:
IElement,IElementImpl,IElementImplExtension,IElementImplSupport,IModelManager.Provider,ISourceConstruct,ISourceConstructImpl,ISourceConstructImplExtension,ISourceElement,ISourceElementImpl,ISourceElementImplSupport
- All Known Implementing Classes:
SourceConstruct
public interface ISourceConstructImplSupport extends ISourceElementImplSupport, ISourceConstructImplExtension
A "trait-like" interface providing a skeletal implementation ofISourceConstructImplExtensionto minimize the effort required to implement that interface. Clients may implement ("mix in") this interface directly or extendSourceConstruct.In general, the members first defined in this interface are not intended to be referenced outside the subtype hierarchy.
- Restriction:
- This interface is not intended to be extended by clients.
-
-
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_OPEN
-
Fields inherited from interface org.eclipse.handly.model.impl.support.IElementImplSupport
NEW_ELEMENTS, NO_BODY
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidbuildStructure_(IContext context, org.eclipse.core.runtime.IProgressMonitor monitor)This implementation throws assertion error; the openable parent builds the whole structure in one go.default booleandefaultEquals_(java.lang.Object obj)A default implementation ofIElement.equals(Object)cannot be provided in an interface, but clients can implementequalsby delegating to this default method.default intdefaultHashCode_()A default implementation ofIElement.hashCode()cannot be provided in an interface, but clients can implementhashCodeby delegating to this default method.default booleanexists_()Returns whether this element exists in the model.default booleanisOpenable_()This implementation always returnsfalse.default voidtoStringName_(java.lang.StringBuilder builder, IContext context)default voidvalidateExistence_(IContext context)This implementation throws assertion error; the openable parent builds the whole structure and determines child existence.-
Methods 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.ISourceConstructImplExtension
getOccurrenceCount_, setOccurrenceCount_
-
Methods inherited from interface org.eclipse.handly.model.impl.support.ISourceElementImplSupport
getSourceElementAt_, getSourceElementAt_, getSourceElementInfo_
-
-
-
-
Method Detail
-
defaultHashCode_
default int defaultHashCode_()
Description copied from interface:IElementImplSupportA default implementation ofIElement.hashCode()cannot be provided in an interface, but clients can implementhashCodeby delegating to this default method.By default, the hash code for an element is a combination of hash codes for its name and its parent element. This method is specialized in
ISourceConstructImplSupportto include the element's occurrence count, and inISourceFileImplSupportto return the hash code for the underlying file object, if there is one. This method is not intended to be replaced by clients; if necessary, clients should overridehashCodedirectly.- Specified by:
defaultHashCode_in interfaceIElementImplSupport- Returns:
- a hash code value
-
defaultEquals_
default boolean defaultEquals_(java.lang.Object obj)
Description copied from interface:IElementImplSupportA default implementation ofIElement.equals(Object)cannot be provided in an interface, but clients can implementequalsby delegating to this default method.By default, two elements that implement this interface are equal if they are identical or if they
can equaleach other and do have equal names and equal parents. This method is specialized inISourceConstructImplSupportandISourceFileImplSupportto also compare occurrence counts and underlying file objects respectively. This method is not intended to be replaced by clients; if necessary, clients should overrideequalsdirectly.- Specified by:
defaultEquals_in interfaceIElementImplSupport- Parameters:
obj- the object with which to compare- Returns:
trueif this element is equal to the given object, andfalseotherwise
-
exists_
default boolean exists_()
Returns whether this element exists in the model.Handles may or may not be backed by an actual element. Handles that are backed by an actual element are said to "exist".
This implementation returns
trueif there is a cached body for this element; otherwise, attempts toopenthis element to determine the result.- Specified by:
exists_in interfaceIElementImpl- Specified by:
exists_in interfaceIElementImplSupport- Returns:
trueif this element exists in the model, andfalseif this element does not exist
-
isOpenable_
default boolean isOpenable_()
This implementation always returnsfalse.- Specified by:
isOpenable_in interfaceIElementImplSupport- Returns:
trueif this element is openable, andfalseotherwise
-
validateExistence_
default void validateExistence_(IContext context) throws org.eclipse.core.runtime.CoreException
This implementation throws assertion error; the openable parent builds the whole structure and determines child existence.- Specified by:
validateExistence_in interfaceIElementImplSupport- Parameters:
context- the operation context (notnull)- Throws:
org.eclipse.core.runtime.CoreException- if this element shall not exist- See Also:
IElementImplSupport.newDoesNotExistException_()
-
buildStructure_
default void buildStructure_(IContext context, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
This implementation throws assertion error; the openable parent builds the whole structure in one go.- Specified by:
buildStructure_in interfaceIElementImplSupport- Parameters:
context- the operation context (notnull)monitor- a progress monitor (notnull). The caller must not rely onIProgressMonitor.done()having been called by the receiver- Throws:
org.eclipse.core.runtime.CoreException- if the structure could not be determined
-
toStringName_
default void toStringName_(java.lang.StringBuilder builder, IContext context)- Specified by:
toStringName_in interfaceIElementImplSupport
-
-