Package spoon.support.sniper.internal
Class ChangeResolver
- java.lang.Object
-
- spoon.support.sniper.internal.ChangeResolver
-
public class ChangeResolver extends Object
Helper which provides details about changes on provided `element`
-
-
Constructor Summary
Constructors Constructor Description ChangeResolver(ChangeCollector changeCollector, CtElement element)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChangeCollector
getChangeCollector()
Set<CtRole>
getChanges(SourcePositionHolder element)
boolean
hasChangedRole()
boolean
isElementExists(SourcePositionHolder element)
boolean
isRoleModified(CtRole ctRole)
-
-
-
Constructor Detail
-
ChangeResolver
public ChangeResolver(ChangeCollector changeCollector, CtElement element)
-
-
Method Detail
-
isElementExists
public boolean isElementExists(SourcePositionHolder element)
- Returns:
- true if `element` still exist in the printed model. false if it was removed or was never there
-
getChanges
public Set<CtRole> getChanges(SourcePositionHolder element)
- Parameters:
element
- to be checked element- Returns:
- Set of
CtRole
s, which are modified for `element`
-
isRoleModified
public boolean isRoleModified(CtRole ctRole)
- Parameters:
ctRole
- to be checkedCtRole
- Returns:
- true if `ctRole` of scope `element` is modified
-
hasChangedRole
public boolean hasChangedRole()
- Returns:
- true if scope `element` is changed
-
getChangeCollector
public ChangeCollector getChangeCollector()
- Returns:
ChangeCollector
-
-