org.aspectj.org.eclipse.jdt.internal.core.dom.rewrite
Class NodeInfoStore

java.lang.Object
  extended by org.aspectj.org.eclipse.jdt.internal.core.dom.rewrite.NodeInfoStore

public final class NodeInfoStore
extends java.lang.Object


Nested Class Summary
static class NodeInfoStore.CopyPlaceholderData
           
static class NodeInfoStore.StringPlaceholderData
           
 
Constructor Summary
NodeInfoStore(AST ast)
           
 
Method Summary
 void clear()
           
 Block createCollapsePlaceholder()
           
 java.lang.Object getPlaceholderData(ASTNode node)
           
 boolean isCollapsed(ASTNode node)
           
 void markAsCopyTarget(ASTNode target, RewriteEventStore.CopySourceInfo copySource)
          Marks a node as a copy or move target.
 void markAsStringPlaceholder(ASTNode placeholder, java.lang.String code)
          Marks a node as a placehoder for a plain string content.
 ASTNode newPlaceholderNode(int nodeType)
          Creates a placeholder node of the given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeInfoStore

public NodeInfoStore(AST ast)
Method Detail

markAsStringPlaceholder

public final void markAsStringPlaceholder(ASTNode placeholder,
                                          java.lang.String code)
Marks a node as a placehoder for a plain string content. The type of the node should correspond to the code's code content.

Parameters:
placeholder - The placeholder node that acts for the string content.
code - The string content.

markAsCopyTarget

public final void markAsCopyTarget(ASTNode target,
                                   RewriteEventStore.CopySourceInfo copySource)
Marks a node as a copy or move target. The copy target represents a copied node at the target (copied) site.

Parameters:
target - The node at the target site. Can be a placeholder node but also the source node itself.
copySource - The info at the source site.

newPlaceholderNode

public final ASTNode newPlaceholderNode(int nodeType)
Creates a placeholder node of the given type. null if the type is not supported

Parameters:
nodeType - Type of the node to create. Use the type constants in NodeInfoStore.
Returns:
Returns a place holder node.

createCollapsePlaceholder

public Block createCollapsePlaceholder()

isCollapsed

public boolean isCollapsed(ASTNode node)

getPlaceholderData

public java.lang.Object getPlaceholderData(ASTNode node)

clear

public void clear()