|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jibx.binding.model.ClassWrapper
public class ClassWrapper
Wrapper for class information. This wraps the BCEL-based class handling implementation to support the interface defined for use with the binding model.
| Constructor Summary | |
|---|---|
ClassWrapper(IClassLocator loc,
ClassFile clas)
Constructor. |
|
| Method Summary | |
|---|---|
protected IClassItem |
buildItem(ClassItem item)
Build an item wrapper. |
IClassItem |
getBestMethod(String name,
String type,
String[] args)
Get information for best matching method. |
ClassFile |
getClassFile()
Get class file information. |
IClassItem |
getDirectField(String name)
Get information for field. |
IClassItem |
getField(String name)
Get information for field. |
IClassItem[] |
getFields()
Get all fields of class. |
IClassItem |
getInitializerMethod(String sig)
Get information for initializer. |
String[] |
getInstanceSigs()
Get signatures for all types of which instances of this type are instances. |
String[] |
getInterfaces()
Get names of all interfaces implemented directly by class. |
String |
getJavaDoc()
Get the JavaDoc comment for this class. |
IClassLocator |
getLocator()
Get the locator which provided this class. |
IClassItem |
getMethod(String name,
String sig)
Get information for method without respect to potential trailing arguments or return value. |
IClassItem |
getMethod(String name,
String[] sigs)
Get information for method matching one of several possible signatures. |
IClassItem[] |
getMethods()
Get all methods of class. |
String |
getName()
Get fully qualified class name. |
String |
getPackage()
Get package name. |
String |
getSignature()
Get signature for class as type. |
IClassItem |
getStaticMethod(String name,
String sig)
Get information for static method without respect to return value. |
IClass |
getSuperClass()
Get superclass. |
boolean |
isAbstract()
Check if class is abstract. |
boolean |
isAccessible(IClassItem item)
Check accessible method. |
boolean |
isAssignable(IClass other)
Check if a value of this type can be directly assigned to another type. |
boolean |
isImplements(String sig)
Check if class implements an interface. |
boolean |
isInterface()
Check if class is an interface. |
boolean |
isModifiable()
Check if class is modifiable. |
boolean |
isSuperclass(String name)
Check if another class is a superclass of this one. |
Class |
loadClass()
Load class in executable form. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClassWrapper(IClassLocator loc,
ClassFile clas)
loc - clas - | Method Detail |
|---|
protected IClassItem buildItem(ClassItem item)
item -
public String getName()
IClass
getName in interface IClasspublic String getSignature()
IClass
getSignature in interface IClasspublic String getPackage()
IClass
getPackage in interface IClasspublic IClass getSuperClass()
IClass
getSuperClass in interface IClasspublic String[] getInterfaces()
IClass
getInterfaces in interface IClassnull, empty array if none)public String[] getInstanceSigs()
IClass
getInstanceSigs in interface IClasspublic boolean isImplements(String sig)
IClass
isImplements in interface IClasssig - signature of interface to be checked
true if interface is implemented by class,
false if notpublic boolean isAbstract()
IClass
isAbstract in interface IClasstrue if class is abstract, false if notpublic boolean isInterface()
IClass
isInterface in interface IClasstrue if class is an interface, false if
notpublic boolean isModifiable()
IClass
isModifiable in interface IClasstrue if class is modifiable, false if
notpublic boolean isSuperclass(String name)
IClass
isSuperclass in interface IClassname - potential superclass to be checked
true if named class is a superclass of this one,
false if notpublic IClassItem getDirectField(String name)
IClass
getDirectField in interface IClassname - field name
null if field not foundpublic IClassItem getField(String name)
IClass
getField in interface IClassname - field name
null if field not found
public IClassItem getMethod(String name,
String sig)
IClass
getMethod in interface IClassname - method namesig - partial method signature to be matched
null if method not found
public IClassItem getMethod(String name,
String[] sigs)
IClass
getMethod in interface IClassname - method namesigs - possible signatures for method (including return type)
null if method not foundpublic IClassItem getInitializerMethod(String sig)
IClass
getInitializerMethod in interface IClasssig - encoded argument list signature
null if method not found
public IClassItem getStaticMethod(String name,
String sig)
IClass
getStaticMethod in interface IClassname - method namesig - encoded argument list signature
null if method not foundpublic boolean isAccessible(IClassItem item)
IClass
isAccessible in interface IClassitem - field or method information
true if accessible, false if notpublic boolean isAssignable(IClass other)
IClass
isAssignable in interface IClassother - type to be assigned to
true if assignable, false if not
public IClassItem getBestMethod(String name,
String type,
String[] args)
IClass
getBestMethod in interface IClassname - method nametype - return value type name (null if indeterminant)args - argument value type names (null if
indeterminant)
null if method not foundpublic ClassFile getClassFile()
IClass
getClassFile in interface IClasspublic Class loadClass()
IClass
loadClass in interface IClassnull if unable to loadpublic IClassItem[] getFields()
IClass
getFields in interface IClasspublic IClassItem[] getMethods()
IClass
getMethods in interface IClasspublic String getJavaDoc()
IClass
getJavaDoc in interface IClassnull if none or no source availablepublic IClassLocator getLocator()
IClass
getLocator in interface IClass
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||