Interface CodeMutableItem

All Superinterfaces:
CodeItem, CodeMutable
All Known Subinterfaces:
CodeAnnotation, CodeAnnotations, CodeArrayType, CodeBlock, CodeBlockBody, CodeBlockDoWhile, CodeBlockFor, CodeBlockIf, CodeBlockInitializer, CodeBlockStatement, CodeBlockWhileDo, CodeBlockWithCondition, CodeComposedType, CodeConstructor, CodeConstructors, CodeDoc, CodeElement, CodeElementWithDeclaringType, CodeElementWithModifiers, CodeElementWithName, CodeElementWithTypeVariables, CodeException, CodeExceptions, CodeField, CodeFields, CodeFile, CodeFunction, CodeGenericType, CodeGenericTypeParameters<P>, CodeImports, CodeLambdaExpression, CodeMember, CodeMembers<M>, CodeMethod, CodeMethods, CodeMutableItemWithComment, CodeMutableItemWithQualifiedName, CodeMutableItemWithType, CodeNestedTypes, CodeNodeItem, CodeNodeItemContainer<I>, CodeNodeItemContainerFlat<I>, CodeNodeItemContainerFlatWithName<I>, CodeNodeItemContainerHierarchical<I>, CodeNodeItemContainerHierarchicalWithName<I>, CodeNodeItemContainerWithName<I>, CodeNodeItemCopyable<P,SELF>, CodeNodeItemWithDeclaringMember, CodeOperation, CodeOperationArg, CodeOperationArgs<A>, CodeOperations<O>, CodePackage, CodeParameter, CodeParameterizedType, CodeParameters, CodePathElement, CodePathElements, CodeProperties, CodeProperty, CodeReturn, CodeSuperTypes, CodeType, CodeTypeParameters, CodeTypePlaceholder, CodeTypeVariable, CodeTypeVariables, CodeTypeWildcard

public interface CodeMutableItem extends CodeMutable, CodeItem
CodeItem that can be mutable.
Since:
1.0.0
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)
  • Method Details

    • setImmutable

      void setImmutable()
      Makes this item immutable. Can not be undone. Multiple calls will have no further effect.
    • getReflectiveObject

      Object getReflectiveObject()
      Returns:
      the optional reflective object of this item such as Class. May be null (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-safe Annotation processing. In most cases the generic type will be derived from AnnotatedElement but in specific cases it can also be ProtectionDomain or other types that have no common parent-type. Therefore this generic type is unbounded here.
    • copy

      Returns:
      a new mutable copy of this CodeMutableItem. Will be a deep-copy with copies of all child CodeMutableItems.
    • copy

      Parameters:
      mapper - the CodeCopyMapper used to map involved nodes during copy.
      Returns:
      a copy() with the related objects mapped using the given CodeCopyMapper.