aspectj
//TaintedObject
public interface TaintedObject {
boolean isTainted();
void setTainted(boolean tainted);
}
//AbstractTaintedObjectAspect TaintedObject
public abstract aspect AbstractTaintedObjectAspect implements TaintedObject {
public final boolean TaintedObject.isTainted() {
return tainted;
}
public final void TaintedObject.setTainted(boolean tainted) {
this.tainted = tainted;
}
}
//
public aspect TaintedObjectAspect extends AbstractTaintedObjectAspect {
declare parents: java.lang.String implements TaintedObject;
declare parents: java.lang.StringBuffer implements TaintedObject;
declare parents: java.lang.StringBuilder implements TaintedObject;
}
Why can String classes directly use methods implemented in abstract classes? what is the role of, declare parents here