Eclipse Platform
2.1

org.eclipse.core.runtime.model
Class PluginModelObject

java.lang.Object
  |
  +--org.eclipse.core.runtime.model.PluginModelObject
Direct Known Subclasses:
ConfigurationElementModel, ConfigurationPropertyModel, ExtensionModel, ExtensionPointModel, LibraryModel, PluginModel, PluginPrerequisiteModel, URLModel

public abstract class PluginModelObject
extends Object

An object which has the general characteristics of all elements in a plug-in manifest.

This class may be subclassed.


Constructor Summary
PluginModelObject()
           
 
Method Summary
protected  void assertIsWriteable()
          Checks that this model object is writeable.
 String getName()
          Returns the name of this element.
 int getStartLine()
          Return the line number for the start tag for this plug-in object.
 boolean isReadOnly()
          Returns whether or not this model object is read-only.
 void markReadOnly()
          Sets this model object and all of its descendents to be read-only.
 void setLocalizedName(String value)
          Optimization to replace a non-localized key with its localized value.
 void setName(String value)
          Sets the name of this element.
 void setStartLine(int lineNumber)
          Set the line number for the start tag for this plug-in object.
 String toString()
          Return a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PluginModelObject

public PluginModelObject()
Method Detail

assertIsWriteable

protected void assertIsWriteable()
Checks that this model object is writeable. A runtime exception is thrown if it is not.

getName

public String getName()
Returns the name of this element.
Returns:
the name of this element or null

getStartLine

public int getStartLine()
Return the line number for the start tag for this plug-in object. This is the line number of the element declaration from the plug-in manifest file.
Returns:
the line number of the start tag for this object

isReadOnly

public boolean isReadOnly()
Returns whether or not this model object is read-only.
Returns:
true if this model object is read-only, false otherwise
See Also:
markReadOnly()

markReadOnly

public void markReadOnly()
Sets this model object and all of its descendents to be read-only. Subclasses may extend this implementation.
See Also:
isReadOnly()

setLocalizedName

public void setLocalizedName(String value)
Optimization to replace a non-localized key with its localized value. Avoids having to access resource bundles for further lookups.

setName

public void setName(String value)
Sets the name of this element.
Parameters:
value - the new name of this element. May be null.

setStartLine

public void setStartLine(int lineNumber)
Set the line number for the start tag for this plug-in object. This is the line number for the element declaration from the plug-in manifest file. This value can only be set once, subsequent calls to this method will be ignored.
Parameters:
lineNumber - the line number of this object's declaration in the file

toString

public String toString()
Return a string representation of this object. This value is not to be relied on and can change at any time. To be used for debugging purposes only.
Overrides:
toString in class Object
See Also:
Object.toString()

Eclipse Platform
2.1

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.