| java.lang.Object org.jibx.binding.classes.ClassItem
ClassItem | public class ClassItem (Code) | | Wrapper for field or method information. Provides the information needed
for access to either existing or added methods in existing classes.
author: Dennis M. Sosnoski version: 1.0 |
ClassItem | public ClassItem(String name, ClassFile cf, FieldOrMethod item)(Code) | | Constructor. Builds a wrapper for an item based on an existing field or
method.
Parameters: name - field or method name Parameters: cf - owning class information Parameters: item - field or method information |
findStaticMethod | public static ClassItem findStaticMethod(String name, String[] sigs) throws JiBXException(Code) | | Get static method by fully qualified name. This splits the class
name from the method name, finds the class, and then tries to find a
matching method name in that class.
Parameters: name - fully qualified class and method name Parameters: sigs - possible method signatures information for the method, or null if not found throws: JiBXException - if configuration error |
findVirtualMethod | public static ClassItem findVirtualMethod(String name, String[] sigs) throws JiBXException(Code) | | Get virtual method by fully qualified name. This splits the class
name from the method name, finds the class, and then tries to find a
matching method name in that class or a superclass.
Parameters: name - fully qualified class and method name Parameters: sigs - possible method signatures information for the method, or null if not found throws: JiBXException - if configuration error |
getAccessFlags | public int getAccessFlags()(Code) | | Get access flags.
flags for access type of field or method |
getArgumentCount | public int getArgumentCount()(Code) | | Get number of arguments for method.
argument count for method, or zero if not a method |
getArgumentType | public String getArgumentType(int index)(Code) | | Get argument type as fully qualified class name.
Parameters: index - argument number argument type name |
getArgumentTypes | public String[] getArgumentTypes()(Code) | | Get argument types as array of fully qualified class names.
array of argument types |
getClassFile | public ClassFile getClassFile()(Code) | | Get owning class information.
owning class information |
getExceptions | public String[] getExceptions()(Code) | | Get names of exceptions thrown by method.
array of exceptions thrown by method, or null ifa field |
getGenericsSignature | public String getGenericsSignature()(Code) | | Get the generics signature information for item.
generics signature (null if none) |
getName | public String getName()(Code) | | Get item name.
item name |
getParameterName | public String getParameterName(int index)(Code) | | Get method parameter name.
parameter name |
getParametersFromSignature | public static String[] getParametersFromSignature(String sig)(Code) | | Get parameter type names from method signature.
Parameters: sig - method signature to be decoded array of argument type names |
getPrimitiveSignature | public static String getPrimitiveSignature(String type)(Code) | | Get the signature for a primitive.
signature for a primitive type |
getSignature | public String getSignature()(Code) | | Get method signature.
encoded method signature |
getSignatureVariants | public static String[] getSignatureVariants(String name) throws JiBXException(Code) | | Get all variant signatures for a fully qualified class name. The
returned array gives all signatures (for interfaces or classes) which
instances of the class can match.
Parameters: name - fully qualified class name possible signature variations for instances of the class throws: JiBXException - if configuration error |
getTypeFromSignature | public static String getTypeFromSignature(String sig)(Code) | | Get return type names from method signature.
Parameters: sig - method signature to be decoded return type name |
getTypeName | public String getTypeName()(Code) | | Get item type as fully qualified class name.
item type name |
isAssignable | public static boolean isAssignable(String from, String to) throws JiBXException(Code) | | Check if a value of one type can be directly assigned to another type.
This is basically the equivalent of the instanceof operator, but with
application to primitive types as well as object types.
Parameters: from - fully qualified class name of initial type Parameters: to - fully qualified class name of assignment type true if assignable, false if not throws: JiBXException - if configuration error |
isInitializer | public boolean isInitializer()(Code) | | Check if item is an initializer.
true if an initializer, false if afield or normal method |
isMethod | public boolean isMethod()(Code) | | Check if item is a method.
true if a method, false if a field |
isPrimitive | public static boolean isPrimitive(String type)(Code) | | Check if type name is a primitive.
true if a primitive, false if not |
isStatic | public boolean isStatic()(Code) | | Check if item is a static.
true if a static, false if member |
makeAccessible | public void makeAccessible(ClassFile src) throws JiBXException(Code) | | Make accessible item. Check if this field or method is accessible from
another class, and if not decreases the access restrictions to make it
accessible.
Parameters: src - class file for required access throws: JiBXException - if cannot be accessed |
setAccessFlags | public void setAccessFlags(int flags)(Code) | | Set access flags.
Parameters: flags - access flags for field or method |
typeFromName | public static Type typeFromName(String name)(Code) | | Create type from name.
Parameters: name - fully qualified type name corresponding type |
|
|