Interface CodeElement
- All Superinterfaces:
CodeItem, CodeItemWithComment, CodeMutable, CodeMutableItem, CodeMutableItemWithComment, CodeNode, CodeNodeItem, CodeWithContext
- All Known Subinterfaces:
CodeArrayType, CodeComposedType, CodeConstructor, CodeElementWithDeclaringType, CodeElementWithModifiers, CodeElementWithName, CodeElementWithTypeVariables, CodeException, CodeField, CodeFile, CodeGenericType, CodeMember, CodeMethod, CodeOperation, CodeOperationArg, CodePackage, CodeParameter, CodeParameterizedType, CodePathElement, CodeProperty, CodeReturn, CodeType, CodeTypePlaceholder, CodeTypeVariable, CodeTypeWildcard
- Since:
- 1.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
-
Field Summary
Fields inherited from interface CodeItem
DEFAULT_INDENT, DEFAULT_NEWLINE -
Method Summary
Methods inherited from interface CodeItem
getLanguage, getSourceCode, write, write, write, write, write, writeMethods inherited from interface CodeItemWithComment
getCommentMethods inherited from interface CodeMutable
isImmutable, isMutableMethods inherited from interface CodeMutableItem
getReflectiveObject, setImmutableMethods inherited from interface CodeMutableItemWithComment
setCommentMethods inherited from interface CodeNodeItem
copyMethods inherited from interface CodeWithContext
getContext, getSource
-
Method Details
-
getDoc
CodeDoc getDoc()- Returns:
- the
documentationof this element. May beemptybut will never benull.
-
getAnnotations
CodeAnnotations getAnnotations()- Returns:
- the
CodeAnnotationswith theCodeAnnotations of this element.
-
removeFromParent
void removeFromParent()Destroys this node and disconnects it from its parent.- Throws:
io.github.mmm.base.exception.ReadOnlyException- ifimmutable.
-
copy
CodeElement copy()- Specified by:
copyin interfaceCodeMutableItem- Specified by:
copyin interfaceCodeNodeItem- Returns:
- a new
mutablecopy of thisCodeMutableItem. Will be a deep-copy with copies of all childCodeMutableItems.
-