@@ -83,4 +83,6 @@ public interface IRelationship extends Serializable { | |||
return ALL[ordinal]; | |||
} | |||
} | |||
public boolean isAffects(); | |||
} |
@@ -76,5 +76,20 @@ public class Relationship implements IRelationship { | |||
public boolean hasRuntimeTest() { | |||
return hasRuntimeTest; | |||
} | |||
// For repairing the relationship map on incremental builds, we need | |||
// to know the direction of the relationship: either 'affects' or 'affected by' | |||
// this set are considered the 'affects' relationship. If we know which direction | |||
// it is in, we know which ones should be removed when a particular resource | |||
// is modified because the subsequent reweave will re-add it. | |||
public boolean isAffects() { | |||
// TODO should be a well defined set (enum type) with a flag for this... | |||
return name.equals("advises") || | |||
name.equals("declares on") || | |||
name.equals("softens") || | |||
name.equals("matched by") || | |||
name.equals("declared on") || | |||
name.equals("annotates"); | |||
} | |||
} |
@@ -55,6 +55,11 @@ public abstract class World implements Dump.INode { | |||
/** The heart of the world, a map from type signatures to resolved types */ | |||
protected TypeMap typeMap = new TypeMap(this); // Signature to ResolvedType | |||
// See pr134471 - we would like to set this false but need for handles in the structure model | |||
// to be independent of location before we can do that. | |||
/** Should we take into account source location when comparing mungers - which may trigger full builds */ | |||
public final static boolean compareLocations = true; | |||
/** Calculator for working out aspect precedence */ | |||
private AspectPrecedenceCalculator precedenceCalculator; |