|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.freehep.rtti.RTTI
public class RTTI
Factory class to build the RTTI (RunTime Type Identification) needed for AID and JACO.
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 its package. |
IClass |
createClass(String name,
boolean isClass,
String packageName,
Vector packageComments,
Vector comments,
Vector eocComments,
Vector templateParameters,
Vector interfaces,
Vector constructors,
IDestructor destructor,
Vector methods,
Vector fields)
Creates a class and registers it under its package. |
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. |
IMethod |
createMethod(String name,
Vector comments,
boolean isStatic,
Vector templateParameters,
IType returnType,
boolean isConst,
Vector parameterTypes,
Vector exceptionTypes)
Creates a method. |
INamedType |
createNamedType(String name,
IType type,
String init)
Creates a named type. |
IPackage |
createPackage(String packageName)
|
IType |
createType(String name,
boolean konst,
boolean primitive,
boolean enumeration,
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 |
static String[] |
getComments(Vector comments,
String language)
returns language specific and general comments |
IPackage |
getPackage(String packageName)
Returns the Package with fully qualified name. |
IPackage[] |
getPackages()
Returns the list of packages. |
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 IPackage[] getPackages()
public IPackage getPackage(String packageName)
packageName
- fully qualified name
public IPackage createPackage(String packageName)
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)destructor
- destructors (IDestructor)methods
- list of methods (IMethod)
public IClass createClass(String name, boolean isClass, String packageName, Vector packageComments, Vector comments, Vector eocComments, Vector templateParameters, 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)destructor
- destructors (IDestructor)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 IMethod createMethod(String name, Vector comments, boolean isStatic, Vector templateParameters, 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 enumeration, boolean reference, int pointer, int dimension, Vector types)
name
- name of the typeprimitive
- true if this type is a primitiveenumeration
- true if this is an enumerationreference
- 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |