public class InterfaceGenerator extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
JAVA_LANG_OBJECT |
static int |
PUBLIC_ABSTRACT |
static int |
PUBLIC_ABSTRACT_INTERFACE |
| Constructor and Description |
|---|
InterfaceGenerator() |
| Modifier and Type | Method and Description |
|---|---|
static RuleInfo |
createRuleInfo(String ruleName,
Class<?>[] paramTypes,
Class<?> returnType)
Creates rule info using rule name, parameters types and return type.
|
static Class<?> |
generateInterface(String className,
IOpenClass openClass,
ClassLoader classLoader)
Generates interface class using methods and fields of given IOpenClass instance.
|
static Class<?> |
generateInterface(String className,
IOpenClass openClass,
ClassLoader classLoader,
String[] includes,
String[] excludes)
Generates interface class using methods and fields of given IOpenClass instance.
|
static Class<?> |
generateInterface(String className,
RuleInfo[] rules,
ClassLoader classLoader)
Generates interface class using collection of rules.
|
public static final int PUBLIC_ABSTRACT_INTERFACE
public static final int PUBLIC_ABSTRACT
public static final String JAVA_LANG_OBJECT
public static Class<?> generateInterface(String className, RuleInfo[] rules, ClassLoader classLoader) throws Exception
className - name of result classrules - collection of rules what will be used as interface methodsclassLoader - class loader what will be used to load generated interfaceException - if an error has occurredpublic static Class<?> generateInterface(String className, IOpenClass openClass, ClassLoader classLoader, String[] includes, String[] excludes) throws Exception
Exception - if an error has occurredpublic static Class<?> generateInterface(String className, IOpenClass openClass, ClassLoader classLoader) throws Exception
className - name of result classopenClass - IOpenClass instanceclassLoader - class loader what will be used to load generated interfaceException - if an error has occurredCopyright © 2004–2019 OpenL Tablets. All rights reserved.