Methods Summary |
---|
public java.lang.Object[] | getQueryableInterfaces()Query this class for a reference to another class that it may hold
return null;
|
public java.lang.String | getRelationText()A short description of what your class holds that can be printed by the logger
return toString();
|
protected final java.lang.String | propogatedRelationText(java.lang.Object o)
if (o instanceof LogRelation)
return ((LogRelation)o).getRelationText();
return null;
|
public final java.lang.Object | queryForClass(java.lang.Class c)
return queryForClass(c, getQueryableInterfaces());
|
protected final java.lang.Object | queryForClass(java.lang.Class c, java.lang.Object[] queryObjects)
if (running || queryObjects == null)
return null;
try {
running = true;
if (c.isInstance(this))
return this;
// Check if any of the objects are of c
for (int i = 0; i < queryObjects.length; i++) {
if (c.isInstance(queryObjects[i]))
return queryObjects[i];
}
// Query each object that is LogRelation
for (int i = 0; i < queryObjects.length; i++) {
if (queryObjects[i] instanceof LogRelation) {
Object obj = ((LogRelation) queryObjects[i]).queryForClass(c,
((LogRelation) queryObjects[i]).getQueryableInterfaces());
if (obj != null)
return obj;
}
}
return null;
} finally {
running = false;
}
|