public class ClassItem extends Object
| Constructor and Description |
|---|
ClassItem(String name,
ClassFile cf,
org.apache.bcel.classfile.FieldOrMethod item)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public ClassFile getClassFile()
public String getName()
public String getFullName()
public String getTypeName()
public int getArgumentCount()
public String getArgumentType(int index)
index - argument numberpublic String getParameterName(int index)
index - parameter indexpublic 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 - to checktrue if a primitive, false if notpublic static String getPrimitiveSignature(String type)
type - to checkpublic static String[] getParametersFromSignature(String sig)
sig - method signature to be decodedpublic static String getTypeFromSignature(String sig)
sig - method signature to be decodedpublic static org.apache.bcel.generic.Type typeFromName(String name)
name - fully qualified type namepublic static ClassItem findVirtualMethod(String name, String[] sigs) throws org.jibx.runtime.JiBXException
name - fully qualified class and method namesigs - possible method signaturesnull if not foundorg.jibx.runtime.JiBXException - if configuration errorpublic static ClassItem findStaticMethod(String name, String[] sigs) throws org.jibx.runtime.JiBXException
name - fully qualified class and method namesigs - possible method signaturesnull if not foundorg.jibx.runtime.JiBXException - if configuration errorpublic static String[] getSignatureVariants(String name) throws org.jibx.runtime.JiBXException
name - fully qualified class nameorg.jibx.runtime.JiBXException - if configuration errorpublic static boolean isAssignable(String from, String to) throws org.jibx.runtime.JiBXException
from - fully qualified class name of initial typeto - fully qualified class name of assignment typetrue if assignable, false if notorg.jibx.runtime.JiBXException - if configuration errorCopyright © 2005–2016 jibx.org. All rights reserved.