Package org.eclipse.steady.java.sign
Class ASTUtil
- java.lang.Object
-
- org.eclipse.steady.java.sign.ASTUtil
-
public class ASTUtil extends Object
Implements different methods for comparing nodes (incl. their descendents).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classASTUtil.NODE_COMPARE_MODE
-
Constructor Summary
Constructors Constructor Description ASTUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ch.uzh.ifi.seal.changedistiller.model.classifiers.ChangeTypegetChangeType(String changeType)Maps string representation ofChangeTypeto the corresponding enumeration value.static ch.uzh.ifi.seal.changedistiller.model.classifiers.EntityTypegetJavaEntityType(String type)Helper method for mapping the JaveEntityTypes for source code entities to string name of EntityType in the JSON TODO : It might be better to move this into a BaseClass, might also be used for deserializing SourceCodeChangestatic Set<Object>intersectSourceCodeChanges(Collection _a, Collection _b, boolean _relaxed)intersectSourceCodeChanges.static Set<Object>intersectSourceCodeChanges(Collection _a, Collection _b, boolean _relaxed, String _cn)intersectSourceCodeChanges.static booleanisEqual(ch.uzh.ifi.seal.changedistiller.treedifferencing.Node _left, ch.uzh.ifi.seal.changedistiller.treedifferencing.Node _right, ASTUtil.NODE_COMPARE_MODE _mode)Returns true if the nodes are equal with regard to parameter mode.
-
-
-
Method Detail
-
isEqual
public static final boolean isEqual(@NotNull ch.uzh.ifi.seal.changedistiller.treedifferencing.Node _left, @NotNull ch.uzh.ifi.seal.changedistiller.treedifferencing.Node _right, @NotNull ASTUtil.NODE_COMPARE_MODE _mode) throws IllegalArgumentExceptionReturns true if the nodes are equal with regard to parameter mode.- Parameters:
_mode- aASTUtil.NODE_COMPARE_MODEobject._left- aNodeobject._right- aNodeobject.- Returns:
- a boolean.
- Throws:
IllegalArgumentException- if any.
-
intersectSourceCodeChanges
public static final Set<Object> intersectSourceCodeChanges(Collection _a, Collection _b, boolean _relaxed)
intersectSourceCodeChanges.
- Parameters:
_a- aCollectionobject._b- aCollectionobject._relaxed- a boolean.- Returns:
- a
Setobject.
-
intersectSourceCodeChanges
public static final Set<Object> intersectSourceCodeChanges(Collection _a, Collection _b, boolean _relaxed, String _cn)
intersectSourceCodeChanges.
- Parameters:
_a- aCollectionobject._b- aCollectionobject._relaxed- a boolean._cn- ClassName- Returns:
- a
Setobject.
-
getChangeType
public static ch.uzh.ifi.seal.changedistiller.model.classifiers.ChangeType getChangeType(String changeType)
Maps string representation ofChangeTypeto the corresponding enumeration value.- Parameters:
changeType- - String representation of changeType- Returns:
- instance of ChangeType corresponding to the SourceCodeChange EntityType
-
getJavaEntityType
public static ch.uzh.ifi.seal.changedistiller.model.classifiers.EntityType getJavaEntityType(String type)
Helper method for mapping the JaveEntityTypes for source code entities to string name of EntityType in the JSON TODO : It might be better to move this into a BaseClass, might also be used for deserializing SourceCodeChange- Parameters:
type- aStringobject.- Returns:
- Corresponding EntityType Number of SourceCodeEntityTypes
-
-