| java.lang.Object org.jibx.binding.model.ClassUtils
ClassUtils | public class ClassUtils (Code) | | Utilities for working with class, field, or method information.
author: Dennis M. Sosnoski |
findStaticMethod | public static IClassItem findStaticMethod(String name, String[] sigs, ValidationContext vctx)(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 Parameters: vctx - validation context (used for class lookup) information for the method, or null if not found |
findVirtualMethod | public static IClassItem findVirtualMethod(String name, String[] sigs, ValidationContext vctx)(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 Parameters: vctx - validation context (used for class lookup) information for the method, or null if not found |
getSignature | public static String getSignature(String type)(Code) | | Gets the signature string corresponding to a type. The base for the type
may be a primitive or class name, and may include trailing array
brackets.
Parameters: type - type name signature string for type |
getSignatureVariants | public static String[] getSignatureVariants(String name, ValidationContext vctx)(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 Parameters: vctx - validation context (used for class lookup) possible signature variations for instances of the class |
isAssignable | public static boolean isAssignable(String from, String to, ValidationContext vctx)(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 Parameters: vctx - validation context (used for class lookup) true if assignable, false if not |
isPrimitive | public static boolean isPrimitive(String type)(Code) | | Check if type name is a primitive.
Parameters: type - true if a primitive, false if not |
|
|