Interface FineModelChangeListener

All Known Implementing Classes:
ActionBasedChangeListenerImpl, EmptyModelChangeListener

public interface FineModelChangeListener
Can be subclassed by clients who want to be notified on all changes in AST nodes
  • Method Details

    • onObjectUpdate

      void onObjectUpdate(CtElement currentElement, CtRole role, CtElement newValue, CtElement oldValue)
      a field corresponding to the role is being set in the AST node
    • onObjectUpdate

      void onObjectUpdate(CtElement currentElement, CtRole role, Object newValue, Object oldValue)
      a field corresponding to the role is being set in the AST node
    • onObjectDelete

      void onObjectDelete(CtElement currentElement, CtRole role, CtElement oldValue)
      a field corresponding to the role is being set to null
    • onListAdd

      void onListAdd(CtElement currentElement, CtRole role, List field, CtElement newValue)
      a newValue is appended to the list corresponding to the role in the AST node
    • onListAdd

      void onListAdd(CtElement currentElement, CtRole role, List field, int index, CtElement newValue)
      a newValue is appended to the list corresponding to the role in the AST node
    • onListDelete

      void onListDelete(CtElement currentElement, CtRole role, List field, Collection<? extends CtElement> oldValue)
      an oldValue is deleted in the list corresponding to the role in the AST node
    • onListDelete

      void onListDelete(CtElement currentElement, CtRole role, List field, int index, CtElement oldValue)
      an oldValue is deleted in the list corresponding to the role in the AST node
    • onListDeleteAll

      void onListDeleteAll(CtElement currentElement, CtRole role, List field, List oldValue)
      a list corresponding to the role in the AST node is emptied
    • onMapAdd

      <K,​ V> void onMapAdd(CtElement currentElement, CtRole role, Map<K,​V> field, K key, CtElement newValue)
      a newValue is appended to the map corresponding to the role in the AST node
    • onMapDelete

      <K,​ V> void onMapDelete(CtElement currentElement, CtRole role, Map<K,​V> field, K key, CtElement oldValue)
      A mapping is removed from the map corresponding to the role in the AST node
      Type Parameters:
      K - the key type
      V - the value type
      Parameters:
      currentElement - the element that changed
      role - the role of the field that changed
      field - the current value of the field that changed
      key - the key of the element that was deleted
      oldValue - the element that was deleted
    • onMapDeleteAll

      <K,​ V> void onMapDeleteAll(CtElement currentElement, CtRole role, Map<K,​V> field, Map<K,​V> oldValue)
      a map corresponding to the role in the AST node is emptied
    • onSetAdd

      void onSetAdd(CtElement currentElement, CtRole role, Set field, CtElement newValue)
      a newValue is appended to the set corresponding to the role in the AST node
    • onSetAdd

      <T extends Enum> void onSetAdd(CtElement currentElement, CtRole role, Set field, T newValue)
      a newValue is appended to the set corresponding to the role in the AST node
    • onSetDelete

      void onSetDelete(CtElement currentElement, CtRole role, Set field, CtElement oldValue)
      an oldValue is deleted in the set corresponding to the role in the AST node
    • onSetDelete

      void onSetDelete(CtElement currentElement, CtRole role, Set field, Collection<ModifierKind> oldValue)
      an oldValue is deleted in the set corresponding to the role in the AST node
    • onSetDelete

      void onSetDelete(CtElement currentElement, CtRole role, Set field, ModifierKind oldValue)
      an oldValue is deleted in the set corresponding to the role in the AST node
    • onSetDeleteAll

      void onSetDeleteAll(CtElement currentElement, CtRole role, Set field, Set oldValue)
      a set corresponding to the role in the AST node is emptied