import java.util.ArrayList; interface INode { INode getParent(); } abstract aspect NodeImpl { declare parents : Child implements INode; declare parents : Parent implements INode; public final INode INode.getParent() { return null; } } public class SimpleTest { public static void main(String[] args) { Tag tag1 = new Tag(); Tag tag2 = new Tag(); tag1.getParent(); } } class Tag { } aspect X extends NodeImpl {}