Class CodeRefinementIntent

java.lang.Object
uno.anahata.asi.intellij.tools.java.coderefiner.CodeRefinementIntent

public class CodeRefinementIntent extends Object
A single structural, member-level modification to one Java file, applied by BatchCodeRefiner against the live PSI tree.

This is the IntelliJ counterpart of the NetBeans V4 CodeRefinementIntent. Each intent targets a class (for CodeRefinementIntent.Type.INSERT) or an existing member by canonical FQN (for CodeRefinementIntent.Type.UPDATE/CodeRefinementIntent.Type.DELETE/CodeRefinementIntent.Type.MOVE); the member source is supplied verbatim in declaration and parsed by the IntelliJ PSI element factory.

Author:
anahata
  • Field Details

    • type

      The kind of modification to perform.
    • classFqn

      private String classFqn
      The canonical FQN of the class to insert into (for INSERT).
    • memberFqn

      private String memberFqn
      The canonical FQN of the member to update/delete/move (method or field).
    • declaration

      private String declaration
      The verbatim Java source of the member (for INSERT/UPDATE), including any Javadoc, annotations and modifiers.
    • position

      private RelativePosition position
      The placement of the member relative to the class body or anchor (INSERT/MOVE).
    • anchorMemberName

      private String anchorMemberName
      The simple name of the anchor member for BEFORE/AFTER placement (INSERT/MOVE).
    • reason

      private String reason
      A short human rationale for this change (surfaced to the user, not applied).
  • Constructor Details

    • CodeRefinementIntent

      public CodeRefinementIntent()