net.groboclown.util.jplugin.v2
Class ClassWrapper
java.lang.Object
|
+--net.groboclown.util.jplugin.v2.ClassWrapper
- public class ClassWrapper
- extends Object
Maintains all the information discovered about the given class.
You must never directly add ClassAttributes to the inner ClassAttribute
field - always go through the addAttributes( ClassAttributes )
method.
- Version:
- 0.9.0 Alpha
- Author:
- Matt Albrecht
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
DISPLAY_NAME
public static final String DISPLAY_NAME
ICON_NAME
public static final String ICON_NAME
attribs
private ClassAttributes attribs
className
private String className
classInspector
private IClassInspector classInspector
icon
private Image icon
iconName
private String iconName
displayName
private String displayName
clazz
private Class clazz
ClassWrapper
public ClassWrapper(String className)
getClassName
public String getClassName()
setIcon
public void setIcon(String iconName)
setIcon
public void setIcon(Image icon)
getIcon
public Image getIcon()
setDisplayName
public void setDisplayName(String name)
getDisplayName
public String getDisplayName()
setClassInspector
public void setClassInspector(IClassInspector ci)
getClassInspector
public IClassInspector getClassInspector()
instantiate
public Object instantiate()
getClassObject
public Class getClassObject()
isOfClass
public boolean isOfClass(Class c)
addAttributes
public void addAttributes(ClassAttributes ca)
- Adds the given class attributes to the internal list of attributes.
If the attributes update any known fields, they will be updated
internally.
hasAttribute
public boolean hasAttribute(String attrib)
- Check if this class has a matching attribute name defined.
hasAttribute
public boolean hasAttribute(String attrib,
String val)
- Check if this class has a matching attribute with a matching
value, ignoring the case of the value.
hasAttribute
public boolean hasAttribute(String attrib,
String val,
boolean isCaseSensitive)
- Check if this class has a matching attribute with a matching
value.
- Parameters:
val
- the value which the attribute must contain, or
null if you want to check if the attribute
is not defined.isCaseSensitive
- true if the values must match
their cases exactly.
getClassAttributes
ClassAttributes getClassAttributes()
- Package-protected. Never add attributes directly to this object.
parseAttributes
protected void parseAttributes(ClassAttributes ca)
setupClassInspector
protected void setupClassInspector()
setIconToName
protected void setIconToName(String iconName)
- Parameters:
iconName
- a non-null string indicating the location of the
icon, a resource name.
Written under the LGPL