FileDocCategorySizeDatePackage
LogRelation.javaAPI DocAzureus 3.0.3.42534Thu Feb 09 19:43:02 GMT 2006org.gudy.azureus2.core3.logging

LogRelation

public class LogRelation extends Object
author
TuxPaper

Fields Summary
private boolean
running
Constructors Summary
Methods Summary
public java.lang.Object[]getQueryableInterfaces()
Query this class for a reference to another class that it may hold

param
c Class desired
return
If found, the class desired. Otherwise, null.

		return null;
	
public java.lang.StringgetRelationText()
A short description of what your class holds that can be printed by the logger

return

		return toString();
	
protected final java.lang.StringpropogatedRelationText(java.lang.Object o)

		if (o instanceof LogRelation)
			return ((LogRelation)o).getRelationText();
		
		return null;
	
public final java.lang.ObjectqueryForClass(java.lang.Class c)

		return queryForClass(c, getQueryableInterfaces());
	
protected final java.lang.ObjectqueryForClass(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;
		}