import net.sourceforge.phpdt.core.WorkingCopyOwner;
/**
- * Wraps an IBufferFactory.
- * TODO remove when removing IBufferFactory
+ * Wraps an IBufferFactory. TODO remove when removing IBufferFactory
+ *
* @deprecated
*/
public class BufferFactoryWrapper extends WorkingCopyOwner {
public net.sourceforge.phpdt.core.IBufferFactory factory;
-
- private BufferFactoryWrapper(net.sourceforge.phpdt.core.IBufferFactory factory) {
+
+ private BufferFactoryWrapper(
+ net.sourceforge.phpdt.core.IBufferFactory factory) {
this.factory = factory;
}
-
- public static WorkingCopyOwner create(net.sourceforge.phpdt.core.IBufferFactory factory) {
+
+ public static WorkingCopyOwner create(
+ net.sourceforge.phpdt.core.IBufferFactory factory) {
return new BufferFactoryWrapper(factory);
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see net.sourceforge.phpdt.core.WorkingCopyOwner#createBuffer(net.sourceforge.phpdt.core.ICompilationUnit)
*/
public IBuffer createBuffer(ICompilationUnit workingCopy) {
- if (this.factory == null) return super.createBuffer(workingCopy);
+ if (this.factory == null)
+ return super.createBuffer(workingCopy);
return this.factory.createBuffer(workingCopy);
- }
-
+ }
+
public boolean equals(Object obj) {
- if (!(obj instanceof BufferFactoryWrapper)) return false;
- BufferFactoryWrapper other = (BufferFactoryWrapper)obj;
- if (this.factory == null) return other.factory == null;
+ if (!(obj instanceof BufferFactoryWrapper))
+ return false;
+ BufferFactoryWrapper other = (BufferFactoryWrapper) obj;
+ if (this.factory == null)
+ return other.factory == null;
return this.factory.equals(other.factory);
}
+
public int hashCode() {
- if (this.factory == null) return 0;
+ if (this.factory == null)
+ return 0;
return this.factory.hashCode();
}
+
public String toString() {
return "FactoryWrapper for " + this.factory; //$NON-NLS-1$
}