|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sibvisions.util.SimpleJavaSource
public class SimpleJavaSource
The SimpleJavaSource interprets Java Source.
| Field Summary | |
|---|---|
protected Map<String,String> |
archiveClassListMap
Imports to find Java Classes. |
protected List<String> |
cachedRealImports
Real Imports without default package. |
protected List<Class<?>> |
classesWithConstants
The Name for constants. |
protected ClassLoader |
classLoader
The classloader for class loading. |
protected String |
className
The class name of this instance. |
protected Map<Class<?>,List<String>> |
ignoreProperties
Class forName. |
protected ArrayList<String> |
imports
Imports to find Java Classes. |
protected Map<Object,String> |
instanceNames
The Name for any instance. |
protected Map<String,Object> |
instances
All known instances. |
protected String |
interfaceNames
The interfaces. |
protected Map<String,Class<?>> |
simpleClassNameClasses
Class forName. |
protected String |
superClassName
The super class. |
protected static StringBuilder |
tempBuilder
Static temporary string builder, to avoid heap consumption. |
protected List<Object> |
tempTags
Parsed Tags Cache. |
| Constructor Summary | |
|---|---|
SimpleJavaSource()
Constructs a new SimpleJavaSource. |
|
| Method Summary | |
|---|---|
void |
addClassWithConstants(Class<?> pClass)
Adds class to constant classes. |
void |
addImport(String pImport)
Adds an import statement to find simple class names. |
Object |
execute(String pSource)
Executes any java statement. |
List<String> |
getArchiveClassList()
Gets the archive class list to find classes with simple class name without class loader. |
Class<?> |
getClassByName(String pClassName)
Gets the class for the given name. |
Class<?> |
getClassByName(String pClassName,
boolean pSimpleClassName)
Gets the class for the given class name. |
Class<?>[] |
getClassesWithConstants()
Gets all classes from constant classes. |
ClassLoader |
getClassLoader()
Gets the class loader. |
String |
getClassName()
Gets the class name. |
Class<?> |
getComponentType(Class<?> pComponentType,
int pDimension)
Gets the array class with the given dimension. |
String |
getDefaultPackage()
Gets the default package of this class name. |
String |
getFieldName(Object pInstance)
Gets the name for a instance. |
String[] |
getFieldNames()
Gets all fields. |
Object |
getFieldValue(String pFieldName)
Gets the instance for a specific field. |
List<String> |
getIgnorePropertyDefinition(Class<?> pSuperClass)
Gets the properties to ignore. |
List<String> |
getImports()
Gets all import statements. |
String |
getInterfaceNames()
Gets the interface names. |
String |
getSuperClassName()
Gets the super class name. |
boolean |
isPropertyIgnored(Object pInstance,
String pPropertyName)
True, if the given property has to be ignored. |
boolean |
isPropertySet(Object pInstance,
String pPropertyName)
True, if the given property is detected as set with isXxxSet. |
void |
removeAllImports()
Removes all import statement. |
void |
removeClassWithConstants(Class<?> pClass)
Removes class from constant classes. |
void |
removeField(String pFieldName)
Removes the specific field. |
void |
removeImport(String pImport)
Removes an import statement. |
void |
setArchiveClassList(List<String> pArchiveClassList)
Sets the archive class list to find classes with simple class name without class loader. |
void |
setClassLoader(ClassLoader pClassLoader)
Sets the class loader. |
void |
setClassName(String pClassName)
Sets the class name. |
void |
setFieldValue(String pFieldName,
Object pInstance)
Sets the instance for a specific field. |
void |
setIgnorePropertyDefinition(Class<?> pSuperClass,
List<String> pIgnoreProperties)
Gets the properties to ignore. |
void |
setInterfaceNames(String pInterfaceNames)
Sets the interface names. |
void |
setSuperClassName(String pSuperClassName)
Sets the super class name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static StringBuilder tempBuilder
protected List<Class<?>> classesWithConstants
protected String className
protected String superClassName
protected String interfaceNames
protected ArrayList<String> imports
protected List<String> cachedRealImports
protected Map<Class<?>,List<String>> ignoreProperties
protected Map<String,String> archiveClassListMap
protected Map<String,Class<?>> simpleClassNameClasses
protected List<Object> tempTags
protected Map<String,Object> instances
protected Map<Object,String> instanceNames
protected ClassLoader classLoader
| Constructor Detail |
|---|
public SimpleJavaSource()
SimpleJavaSource.
| Method Detail |
|---|
public ClassLoader getClassLoader()
public void setClassLoader(ClassLoader pClassLoader)
pClassLoader - the class loader.public String getClassName()
public void setClassName(String pClassName)
pClassName - the class name.public String getDefaultPackage()
public String getSuperClassName()
public void setSuperClassName(String pSuperClassName)
pSuperClassName - the super class name.public String getInterfaceNames()
public void setInterfaceNames(String pInterfaceNames)
pInterfaceNames - the interface names.public List<String> getArchiveClassList()
public void setArchiveClassList(List<String> pArchiveClassList)
pArchiveClassList - the archive class list.public void addClassWithConstants(Class<?> pClass)
pClass - the class to add.public void removeClassWithConstants(Class<?> pClass)
pClass - the class to remove.public Class<?>[] getClassesWithConstants()
public void addImport(String pImport)
pImport - the import.public void removeImport(String pImport)
pImport - the class.public void removeAllImports()
public List<String> getImports()
public List<String> getIgnorePropertyDefinition(Class<?> pSuperClass)
pSuperClass - the super class
public void setIgnorePropertyDefinition(Class<?> pSuperClass,
List<String> pIgnoreProperties)
pSuperClass - the super classpIgnoreProperties - the properties to ignore.
public boolean isPropertyIgnored(Object pInstance,
String pPropertyName)
pInstance - the instance.pPropertyName - the property.
public boolean isPropertySet(Object pInstance,
String pPropertyName)
pInstance - the instance.pPropertyName - the property.
public Object getFieldValue(String pFieldName)
pFieldName - the field name.
public void setFieldValue(String pFieldName,
Object pInstance)
pFieldName - the field name.pInstance - the instance.public String getFieldName(Object pInstance)
pInstance - the field name.
public void removeField(String pFieldName)
pFieldName - the field name.public String[] getFieldNames()
public Object execute(String pSource)
pSource - the source.
public Class<?> getClassByName(String pClassName,
boolean pSimpleClassName)
pClassName - the class namepSimpleClassName - true if the name is a simple class name, false otherwise
null if no class with given name was foundpublic Class<?> getClassByName(String pClassName)
pClassName - the full qualified class name
null if no class with given name was found
public Class<?> getComponentType(Class<?> pComponentType,
int pDimension)
pComponentType - the simple class name.pDimension - the array dimension.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||