Class NullBuffer
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.Buffer
org.aspectj.org.eclipse.jdt.internal.core.NullBuffer
- All Implemented Interfaces:
IBuffer
This class represents a null buffer. This buffer is used to represent a buffer for a class file
that has no source attached.
-
Nested Class Summary
Nested classes/interfaces inherited from interface IBuffer
IBuffer.ITextEditCapabilityModifier and TypeInterfaceDescriptionstatic interfaceImplementors ofIBuffercan additionally implementIBuffer.ITextEditCapability. -
Constructor Summary
ConstructorsConstructorDescriptionNullBuffer(org.eclipse.core.resources.IFile file, IOpenable owner, boolean readOnly) Creates a new null buffer on an underlying resource. -
Method Summary
Methods inherited from class Buffer
addBufferChangedListener, append, append, close, getChar, getCharacters, getContents, getLength, getOwner, getText, getUnderlyingResource, hasUnsavedChanges, isClosed, isReadOnly, moveAndResizeGap, notifyChanged, removeBufferChangedListener, replace, replace, save, setContents, setContents, setReadOnly, toStringModifier and TypeMethodDescriptionvoidAdds the given listener for changes to this buffer.voidappend(char[] text) Append thetextto the actual content, the gap is moved to the end of thetext.voidAppend thetextto the actual content, the gap is moved to the end of thetext.voidclose()Closes the buffer.chargetChar(int position) Returns the character at the given position in this buffer.char[]Returns the contents of this buffer as a character array, ornullif the buffer has not been initialized.Returns the contents of this buffer as aString.intReturns number of characters stored in this buffer.getOwner()Returns the Java openable element owning of this buffer.getText(int offset, int length) Returns the given range of text in this buffer.org.eclipse.core.resources.IResourceReturns the underlying resource for which this buffer was opened, ornullif this buffer was not opened on a resource.booleanReturns whether this buffer has been modified since it was opened or since it was last saved.booleanisClosed()Returns whether this buffer has been closed.booleanReturns whether this buffer is read-only.protected voidmoveAndResizeGap(int position, int size) Moves the gap to location and adjust its size to the anticipated change size.protected voidnotifyChanged(BufferChangedEvent event) Notify the listeners that this buffer has changed.voidRemoves the given listener from this buffer.voidreplace(int position, int length, char[] text) Replaceslengthcharacters starting frompositionwithtext.voidReplaceslengthcharacters starting frompositionwithtext.voidsave(org.eclipse.core.runtime.IProgressMonitor progress, boolean force) Saves the contents of this buffer to its underlying resource.voidsetContents(char[] newContents) Sets the contents of this buffer to the given character array.voidsetContents(String newContents) Sets the contents of this buffer to the givenString.protected voidsetReadOnly(boolean readOnly) Sets thisBufferto be read only.toString()
-
Constructor Details
-
NullBuffer
Creates a new null buffer on an underlying resource.
-