Interface CodeConstructor
- All Superinterfaces:
CodeAdvancedMergeableItem<CodeConstructor>, CodeElement, CodeElementWithDeclaringType, CodeElementWithModifiers, CodeElementWithName, CodeElementWithTypeVariables, CodeFunction, CodeItem, CodeItemWithComment, CodeItemWithDeclaringType, CodeItemWithModifiers, CodeItemWithName, CodeItemWithType, CodeItemWithVariables, CodeMember, CodeMergeableItem<CodeConstructor>, CodeMutable, CodeMutableItem, CodeMutableItemWithComment, CodeNode, CodeNodeItem, CodeNodeItemCopyable<CodeConstructors, CodeConstructor>, CodeOperation, CodeWithContext
public interface CodeConstructor
extends CodeOperation, CodeAdvancedMergeableItem<CodeConstructor>, CodeNodeItemCopyable<CodeConstructors, CodeConstructor>
CodeOperation representing a constructor of a CodeType.- Since:
- 1.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
- See Also:
-
Field Summary
Fields inherited from interface CodeItem
DEFAULT_INDENT, DEFAULT_NEWLINE -
Method Summary
Modifier and TypeMethodDescriptioncopy()Constructor<?> default CodeGenericTypegetType()default voidDeprecated.Methods inherited from interface CodeAdvancedMergeableItem
merge, merge, mergeMethods inherited from interface CodeElement
getAnnotations, getDoc, removeFromParentMethods inherited from interface CodeElementWithModifiers
setModifiersMethods inherited from interface CodeElementWithTypeVariables
getTypeParametersMethods inherited from interface CodeFunction
canHaveBody, getBody, setBodyMethods 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 CodeItemWithVariables
getVariableMethods inherited from interface CodeMutable
isImmutable, isMutableMethods inherited from interface CodeMutableItem
setImmutableMethods inherited from interface CodeMutableItemWithComment
setCommentMethods inherited from interface CodeNodeItemCopyable
copy, getParentMethods inherited from interface CodeOperation
getExceptions, getParameters, getParentMethods inherited from interface CodeWithContext
getContext, getSource
-
Method Details
-
getType
- Specified by:
getTypein interfaceCodeItemWithType- Returns:
- the
generic typeof this item.
-
setName
Deprecated.- Specified by:
setNamein interfaceCodeElementWithName- Parameters:
name- the newname.
-
getReflectiveObject
Constructor<?> getReflectiveObject()- Specified by:
getReflectiveObjectin interfaceCodeElementWithTypeVariables- Specified by:
getReflectiveObjectin interfaceCodeMember- Specified by:
getReflectiveObjectin interfaceCodeMutableItem- Specified by:
getReflectiveObjectin interfaceCodeOperation- 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
CodeConstructor copy()- Specified by:
copyin interfaceCodeElement- Specified by:
copyin interfaceCodeElementWithDeclaringType- Specified by:
copyin interfaceCodeElementWithModifiers- Specified by:
copyin interfaceCodeElementWithName- Specified by:
copyin interfaceCodeElementWithTypeVariables- Specified by:
copyin interfaceCodeMember- Specified by:
copyin interfaceCodeMutableItem- Specified by:
copyin interfaceCodeNodeItem- Specified by:
copyin interfaceCodeNodeItemCopyable<CodeConstructors, CodeConstructor>- Specified by:
copyin interfaceCodeOperation- Returns:
- a new
mutablecopy of thisCodeMutableItem. Will be a deep-copy with copies of all childCodeMutableItems.
-
nameof aCodeConstructorhas to be equal to thesimple nameof itsdeclaring type.