Package com.pnfsoftware.jeb.core.units
Class AbstractUnitPlugin
java.lang.Object
com.pnfsoftware.jeb.core.AbstractPlugin
com.pnfsoftware.jeb.core.units.AbstractUnitPlugin
- All Implemented Interfaces:
IPlugin
,IUnitPlugin
- Direct Known Subclasses:
AbstractNativePlugin
Skeleton implementation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IPropertyDefinitionManager
protected IPropertyManager
protected double
protected String
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractUnitPlugin
(String type, double priority) Create a new native code plugin. -
Method Summary
Modifier and TypeMethodDescriptionRetrieve the identity of the unit type.double
Get the identifier priority.Retrieve the property definition manager (PDM) used by this plugin.The type-id provider for this type of units.void
initialize
(IPropertyDefinitionManager parentPdm) Create and initialize the property manager for this identifier.Methods inherited from class com.pnfsoftware.jeb.core.AbstractPlugin
dispose, getData, setData
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.pnfsoftware.jeb.core.IPlugin
dispose, getData, getPluginInformation, setData
-
Field Details
-
type
-
priority
protected double priority -
pdm
-
pm
-
-
Constructor Details
-
AbstractUnitPlugin
Create a new native code plugin.- Parameters:
type
- mandatory type, which will be used as the sub-region type when the identifier isinitialized
. The type should be a valid region name, please seePropertyDefinitionManager
priority
- mandatory priority
-
-
Method Details
-
initialize
Description copied from interface:IUnitPlugin
Create and initialize the property manager for this identifier. This method is usually called after construction on the identifier.Overrides are allowed if a plugin needs to define its own properties, but a call to the superclass method should take place first. If not, the implementor is responsible for creating the plugins' PDM.
- Specified by:
initialize
in interfaceIUnitPlugin
- Parameters:
parentPdm
- the parent PDM
-
getPropertyDefinitionManager
Description copied from interface:IUnitPlugin
Retrieve the property definition manager (PDM) used by this plugin.- Specified by:
getPropertyDefinitionManager
in interfaceIUnitPlugin
- Returns:
- the PDM
-
getFormatType
Description copied from interface:IUnitPlugin
Retrieve the identity of the unit type. The type should be unique across all units.- Specified by:
getFormatType
in interfaceIUnitPlugin
- Returns:
- the non-null type
-
getPriority
public double getPriority()Description copied from interface:IUnitPlugin
Get the identifier priority. Priority can be negative. Priorities are used by identifier managers (eg,Processors
) to ensure that identifiers are called in a (partially) predictable order, if need be. The higher the number, the higher the priority.Recommendation: typical priority is zero. Relying on priority for proper identification should be used as a last resort measure.
- Specified by:
getPriority
in interfaceIUnitPlugin
- Returns:
- the identifier priority
-
getTypeIdProvider
Description copied from interface:IUnitPlugin
The type-id provider for this type of units. Currently, This method is not intended to use by third-party clients.- Specified by:
getTypeIdProvider
in interfaceIUnitPlugin
- Returns:
- a type-id provider, null if none
-