|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jibx.binding.classes.ClassItem
public class ClassItem
Wrapper for field or method information. Provides the information needed for access to either existing or added methods in existing classes.
| Constructor Summary | |
|---|---|
ClassItem(String name,
ClassFile cf,
org.apache.bcel.classfile.FieldOrMethod item)
Constructor. |
|
| Method Summary | |
|---|---|
static ClassItem |
findStaticMethod(String name,
String[] sigs)
Get static method by fully qualified name. |
static ClassItem |
findVirtualMethod(String name,
String[] sigs)
Get virtual method by fully qualified name. |
int |
getAccessFlags()
Get access flags. |
int |
getArgumentCount()
Get number of arguments for method. |
String |
getArgumentType(int index)
Get argument type as fully qualified class name. |
String[] |
getArgumentTypes()
Get argument types as array of fully qualified class names. |
ClassFile |
getClassFile()
Get owning class information. |
String[] |
getExceptions()
Get names of exceptions thrown by method. |
String |
getFullName()
Get fully-qualified class and method name. |
String |
getGenericsSignature()
Get the generics signature information for item. |
String |
getName()
Get item name. |
String |
getParameterName(int index)
Get method parameter name. |
static String[] |
getParametersFromSignature(String sig)
Get parameter type names from method signature. |
static String |
getPrimitiveSignature(String type)
Get the signature for a primitive. |
String |
getSignature()
Get method signature. |
static String[] |
getSignatureVariants(String name)
Get all variant signatures for a fully qualified class name. |
static String |
getTypeFromSignature(String sig)
Get return type names from method signature. |
String |
getTypeName()
Get item type as fully qualified class name. |
static boolean |
isAssignable(String from,
String to)
Check if a value of one type can be directly assigned to another type. |
boolean |
isInitializer()
Check if item is an initializer. |
boolean |
isMethod()
Check if item is a method. |
static boolean |
isPrimitive(String type)
Check if type is a primitive. |
boolean |
isStatic()
Check if item is a static. |
void |
makeAccessible(ClassFile src)
Make accessible item. |
void |
setAccessFlags(int flags)
Set access flags. |
static org.apache.bcel.generic.Type |
typeFromName(String name)
Create type from name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClassItem(String name,
ClassFile cf,
org.apache.bcel.classfile.FieldOrMethod item)
name - field or method namecf - owning class informationitem - field or method information| Method Detail |
|---|
public ClassFile getClassFile()
public String getName()
public String getFullName()
public String getTypeName()
public int getArgumentCount()
public String getArgumentType(int index)
index - argument number
public String getParameterName(int index)
index - parameter index
public String[] getArgumentTypes()
public int getAccessFlags()
public void setAccessFlags(int flags)
flags - access flags for field or methodpublic void makeAccessible(ClassFile src)
src - class file for required accesspublic boolean isStatic()
true if a static, false if memberpublic String getSignature()
public boolean isMethod()
true if a method, false if a fieldpublic boolean isInitializer()
true if an initializer, false if a
field or normal methodpublic String[] getExceptions()
null if
a fieldpublic String getGenericsSignature()
null if none)public static boolean isPrimitive(String type)
type -
true if a primitive, false if notpublic static String getPrimitiveSignature(String type)
type -
public static String[] getParametersFromSignature(String sig)
sig - method signature to be decoded
public static String getTypeFromSignature(String sig)
sig - method signature to be decoded
public static org.apache.bcel.generic.Type typeFromName(String name)
name - fully qualified type name
public static ClassItem findVirtualMethod(String name,
String[] sigs)
throws JiBXException
name - fully qualified class and method namesigs - possible method signatures
null if not found
JiBXException - if configuration error
public static ClassItem findStaticMethod(String name,
String[] sigs)
throws JiBXException
name - fully qualified class and method namesigs - possible method signatures
null if not found
JiBXException - if configuration error
public static String[] getSignatureVariants(String name)
throws JiBXException
name - fully qualified class name
JiBXException - if configuration error
public static boolean isAssignable(String from,
String to)
throws JiBXException
from - fully qualified class name of initial typeto - fully qualified class name of assignment type
true if assignable, false if not
JiBXException - if configuration error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||