Interface CodeMember
- All Superinterfaces:
CodeElement, CodeElementWithDeclaringType, CodeElementWithModifiers, CodeElementWithName, CodeItem, CodeItemWithComment, CodeItemWithDeclaringType, CodeItemWithModifiers, CodeItemWithName, CodeItemWithType, CodeMutable, CodeMutableItem, CodeMutableItemWithComment, CodeNode, CodeNodeItem, CodeWithContext
- All Known Subinterfaces:
CodeConstructor, CodeField, CodeMethod, CodeOperation, CodeProperty
CodeElementWithModifiers representing a Member of a
CodeType that is either a CodeOperation or a CodeField.- 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 CodeElement
getAnnotations, getDoc, removeFromParentMethods inherited from interface CodeElementWithModifiers
setModifiersMethods inherited from interface CodeElementWithName
setNameMethods inherited from interface CodeItem
getLanguage, getSourceCode, write, write, write, write, write, writeMethods inherited from interface CodeItemWithComment
getCommentMethods inherited from interface CodeItemWithDeclaringType
getDeclaringTypeMethods inherited from interface CodeItemWithModifiers
getModifiersMethods inherited from interface CodeItemWithName
getNameMethods inherited from interface CodeItemWithType
getTypeMethods inherited from interface CodeMutable
isImmutable, isMutableMethods inherited from interface CodeMutableItem
setImmutableMethods inherited from interface CodeMutableItemWithComment
setCommentMethods inherited from interface CodeNodeItem
copyMethods inherited from interface CodeWithContext
getContext, getSource
-
Method Details
-
getParent
CodeMembers<?> getParent()- Specified by:
getParentin interfaceCodeNode- Returns:
- the parent of this
CodeNode. May only benullfor instances ofCodeContext.
-
getReflectiveObject
AccessibleObject getReflectiveObject()- Specified by:
getReflectiveObjectin interfaceCodeMutableItem- Returns:
- the optional reflective object of this item such as
Class. May benull(e.g. if this object was created from source-code only or has been created dynamically). However, if available it can be helpful for analysis especially in case of type-safeAnnotationprocessing. In most cases the generic type will be derived fromAnnotatedElementbut in specific cases it can also beProtectionDomainor other types that have no common parent-type. Therefore this generic type is unbounded here. - See Also:
-
copy
CodeMember copy()- Specified by:
copyin interfaceCodeElement- Specified by:
copyin interfaceCodeElementWithDeclaringType- Specified by:
copyin interfaceCodeElementWithModifiers- Specified by:
copyin interfaceCodeElementWithName- Specified by:
copyin interfaceCodeMutableItem- Specified by:
copyin interfaceCodeNodeItem- Returns:
- a new
mutablecopy of thisCodeMutableItem. Will be a deep-copy with copies of all childCodeMutableItems.
-