|
FreeHEP API Version v1.2.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.freehep.jaco.rtti.RTTI
Factory class to build the RTTI (RunTime Type Identification) needed for JACO.
Classes are registered under their fully qualified name (without the packagePrefix, but with the already defined package name).
Constructor Summary | |
RTTI()
Creates an empty RTTI |
Method Summary | |
IClass |
createClass(String name,
boolean isClass,
String packageName,
Vector packageComments,
Vector comments,
Vector eocComments,
Vector interfaces,
Vector constructors,
IDestructor destructor,
Vector methods,
Vector fields)
Creates a class and registers it under "packageName.name". |
IConstructor |
createConstructor(String name,
Vector comments,
Vector parameterTypes,
Vector exceptionTypes)
Creates a constructor. |
IDestructor |
createDestructor(String name,
Vector comments,
Vector exceptionTypes)
Creates a destructor. |
IField |
createField(INamedType namedType,
Vector comments)
Creates a named field. |
IMethod |
createMethod(String name,
Vector comments,
boolean isStatic,
IType returnType,
boolean isConst,
Vector parameterTypes,
Vector exceptionTypes)
Creates a method. |
INamedType |
createNamedType(String name,
IType type,
String init)
Creates a named type. |
IType |
createType(String name,
boolean konst,
boolean primitive,
boolean reference,
int pointer,
int dimension,
Vector types)
Creates a type (primitive or Class) |
IType |
createType(String name,
IType alias,
boolean reference,
int pointer,
int dimension)
Creates an aliased type |
IClass |
getClass(String fullname)
Returns the class with fully qualified name. |
IClass |
getClass(String packageName,
String name)
Returns the class for a fully qualified name: "packageName.name" |
String[] |
getClassNames()
Returns the list of fully qualified class names, which can be used for lookups. |
static String[] |
getComments(Vector comments,
String language)
returns language specific and general comments |
String |
toString()
String representation of the RTTI, which lists the full RTTI in semi-java format, without package prefix. |
String |
toString(String packagePrefix)
String representation of the RTTI, which lists the full RTTI in semi-java format, with package prefix. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public RTTI()
Method Detail |
public String[] getClassNames()
public IClass getClass(String packageName, String name)
packageName
- name of the packagename
- name of the class
public IClass getClass(String fullname)
fullname
- fully qualified name
public IClass createClass(String name, boolean isClass, String packageName, Vector packageComments, Vector comments, Vector eocComments, Vector interfaces, Vector constructors, IDestructor destructor, Vector methods, Vector fields)
A warning is issued if a class definition already exists under this name. The class definition is overridden.
name
- name of the classpackageName
- package namecomments
- list of comments (String)interfaces
- list of interface names (String: fully qualified)constructors
- list of constructors (IConstructor)methods
- list of methods (IMethod)
public IConstructor createConstructor(String name, Vector comments, Vector parameterTypes, Vector exceptionTypes)
name
- name of the constructorcomments
- list of comments (String)parameterTypes
- list of parameter types (InamedType)exceptionTypes
- list of exception names (String)
public IDestructor createDestructor(String name, Vector comments, Vector exceptionTypes)
name
- name of the destructorcomments
- list of comments (String)exceptionTypes
- list of exception names (String)
public IMethod createMethod(String name, Vector comments, boolean isStatic, IType returnType, boolean isConst, Vector parameterTypes, Vector exceptionTypes)
name
- name of the methodcomments
- list of comments (String)isStatic
- true if method is staticreturnType
- type of return parameter (IType)parameterTypes
- list of parameter types (INamedType)exceptionTypes
- list of exception names (String)
public IField createField(INamedType namedType, Vector comments)
namedType
- named type (INamedType)
public INamedType createNamedType(String name, IType type, String init)
name
- name of the parameter (String)type
- type of the parameter (IType)init
- init of the parameter (String)
public IType createType(String name, boolean konst, boolean primitive, boolean reference, int pointer, int dimension, Vector types)
name
- name of the typeprimitive
- true if this type is a primitivereference
- true if this type is a referencepointer
- number of pointer postfixes (*)dimension
- dimension of the type, 0 for no dimension.
public IType createType(String name, IType alias, boolean reference, int pointer, int dimension)
name
- name of the typealias
- pointing to aliased type (typedef)reference
- true if this type is a referencepointer
- number of pointer postfixes (*)dimension
- dimension of the type, 0 for no dimension.
public String toString()
toString
in class Object
public String toString(String packagePrefix)
packagePrefix
- name to prefix to the package name
public static String[] getComments(Vector comments, String language)
comments
- list of all comments, each may be preceded by @xxx: to specify language xxxlanguage
- to be used to filter comments
|
FreeHEP API Version v1.2.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |