public class IntrospectedCodeClass extends Object implements CodeClass
Instances of IntrospectedCodeClass are generated using the static factory methods named forClass(). These methods ensure that the same IntrospectedCodeClass instance is returned for multiple invocations with the same argument.
| Modifier and Type | Method and Description | 
|---|---|
static CodeClass | 
forClass(Class c)
Get the CodeClass for a Java Class. 
 | 
static CodeClass | 
forClass(String name)
Get the CodeClass for a Java class name. 
 | 
static CodeMethod | 
forMethod(Method method)  | 
CodeMethod | 
getConstructor(CodeClass[] args)
Get a constructor by argument list. 
 | 
String | 
getDescriptor()  | 
CodeField | 
getFieldByName(String name)
Get a field by its name. 
 | 
Set | 
getFields()
Get all fields accessible through this class. 
 | 
List | 
getInterfaces()  | 
String | 
getJName()  | 
CodeMethod | 
getMethod(String name,
         CodeClass[] args)
Get a method by name and argument list. 
 | 
Set | 
getMethods()
Get all methods declared by this class and its super classes, removing
 all super class methods that are over ridden. 
 | 
Set | 
getMethodsByName(String name)
Get the name of all methods that could be invoked through this class with
 a given name. 
 | 
int | 
getModifiers()
Get the modifiers associated with the class. 
 | 
String | 
getName()  | 
CodeClass | 
getSuperClass()  | 
boolean | 
isArray()
Discover if the class is an array type. 
 | 
boolean | 
isPrimitive()
Discover if the class represents a primitive type. 
 | 
String | 
toString()  | 
public static CodeClass forClass(Class c)
c - the Java Class to reflectpublic static CodeClass forClass(String name) throws ClassNotFoundException
name - the Java class name to reflectClassNotFoundExceptionpublic static CodeMethod forMethod(Method method)
public String getDescriptor()
getDescriptor in interface CodeClasspublic int getModifiers()
CodeClassgetModifiers in interface CodeClasspublic CodeClass getSuperClass()
getSuperClass in interface CodeClasspublic List getInterfaces()
getInterfaces in interface CodeClasspublic Set getMethods()
CodeClassThis should return methods, regardless of their accessability.
getMethods in interface CodeClasspublic CodeField getFieldByName(String name) throws NoSuchFieldException
CodeClassgetFieldByName in interface CodeClassname - the field nameNoSuchFieldException - if there is no field by that name accessible
   through this classpublic Set getFields()
CodeClasspublic Set getMethodsByName(String name)
CodeClassgetMethodsByName in interface CodeClassname - the name of the methodpublic CodeMethod getMethod(String name, CodeClass[] args) throws NoSuchMethodException
CodeClassgetMethod in interface CodeClassname - the name of the methodargs - the arguments it takesNoSuchMethodException - if there is no maching methodpublic CodeMethod getConstructor(CodeClass[] args) throws NoSuchMethodException
CodeClassgetConstructor in interface CodeClassargs - the arguments it takesNoSuchMethodException - if there is no matching constructorpublic boolean isPrimitive()
CodeClassisPrimitive in interface CodeClasspublic boolean isArray()
CodeClassCopyright © 2020 BioJava. All rights reserved.