com.inline.feature.example
Class JavaClassFeature
java.lang.Object
|
+--com.inline.feature.common.AbstractResourceListener
|
+--com.inline.feature.common.AbstractFeature
|
+--com.inline.feature.example.JavaClassFeature
- public class JavaClassFeature
- extends AbstractFeature
Methods inherited from class com.inline.feature.common.AbstractFeature |
activate,
addManagedProperty,
addMessages,
addPropertyChangeListener,
applyChanges,
canChange,
canDelete,
commit,
delete,
firePropertyChange,
firePropertyChange,
getActions,
getChildren,
getChildSetActions,
getDisplayProperties,
getDisplayType,
getMessages,
getPrimitiveActions,
getSignature,
getURL,
insert,
invalidate,
isMarkedForDeletion,
isModified,
isModified,
isNew,
markForDeletion,
propertyChanged,
refresh,
refresh,
refreshProperty,
release,
removePropertyChangeListener,
toString,
toStringVerbose,
validateChanges,
validateChanges |
Methods inherited from class com.inline.feature.common.AbstractResourceListener |
getFeatureModel,
getParent,
passivate,
propertyChange,
registerResourceAdapter,
registerResourceAdapter,
registerResourceSetAdapter,
registerResourceSetAdapter,
resourceAdded,
resourceRemoved,
unregisterResourceAdapter,
unregisterResourceSetAdapter |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
TYPE
public static final java.lang.String TYPE
className
protected java.lang.String className
classDescriptorAdapter
protected ResourceAdapter classDescriptorAdapter
classDescriptor
protected com.inline.vide.inflect.ClassDescriptor classDescriptor
JavaClassFeature
public JavaClassFeature(Feature parent,
java.lang.String signature)
getType
public java.lang.String getType()
- Description copied from interface: Feature
- Returns the feature type.
The recommended type declaration syntax is:
class MyFeature ... {
public static final String TYPE = "foo-bar-myfeature";
public String getType() { return TYPE; }
...
}
constructSignature
public static java.lang.String constructSignature(Feature parent,
java.lang.String className)
parseSignature
public void parseSignature(java.lang.String signature)
- Description copied from class: AbstractFeature
- Override this to extract some of the feature properties from the signature.
If the signature is not carrying any of those properties, there is no
need to override this method.
- Overrides:
- parseSignature in class AbstractFeature
getClassName
public java.lang.String getClassName()
registerDependencies
protected void registerDependencies()
- Description copied from class: AbstractResourceListener
- Override to register all resource adapters this
feature set depends upon. Call registerResourceAdapter(reference)
for each resource adapter and registerResourceSetAdapter(type, qualifier)
for each resource set adapter. AbstractResourceListener will make the feature
an observer of events from those adapters as needed.
- Overrides:
- registerDependencies in class AbstractResourceListener
getClassDescriptorReference
public com.inline.resources.ResourceReference getClassDescriptorReference()
refreshProperties
public void refreshProperties()
- Description copied from class: AbstractFeature
- Override to parse resources. This method is invoked by
refresh()
.
The registerDependencies
method is called prior to
refreshProperties
, therefore the registered resource adapters and
resource set adapters can be used by this method.
parseSignature()
is also called before refreshProperties
.
The implementation of refreshProperties
should call setBar()
methods to set the feature properties. This way observers of the feature will be informed
whenever conseqent executions of refresh
produce different
property values.
The method should re-acquire resources from resource adapters. Note that
a resource adapter may return a different instance of resource when invoked from
consequent refreshProperties()
calls.
- Overrides:
- refreshProperties in class AbstractFeature
isInterface
public boolean isInterface()
resourceChanged
protected void resourceChanged(ResourceAdapter adapter,
java.lang.String property,
java.lang.Object oldValue,
java.lang.Object newValue)
- Description copied from class: AbstractResourceListener
- Event handler for resource adapters. Calls
this.invalidate()
.
- Overrides:
- resourceChanged in class AbstractResourceListener