FreeHEP API
Version current

org.freehep.jaco.rtti
Class IType

java.lang.Object
  extended byorg.freehep.jaco.rtti.IType

public class IType
extends Object

Defines a type in the RTTI. This type may be cascaded (typedef in C++) to another type. The methods isPrimitive, isEnumeration, getDimension and getPointer accomodate for this.

Version:
$Id: IType.java,v 1.19 2005/04/26 06:49:41 duns Exp $
Author:
Mark Donszelmann
Source Code:
IType.java

Method Summary
 boolean equals(Object o)
          returns true is the two types are equivalent, that is after all aliasing has been done
 int getDimension()
          Indicates the dimension of this type.
 String getName()
          Returns the name of the type.
 int getPointer()
          Indicates the number of pointer postfixes this type has.
 String getSignature(String packageName, Properties imports)
           
 IType[] getTypes()
          Indicates the template of this type.
 boolean isConst()
          Indicates if this type is a const type.
 boolean isEnumeration()
          Indicates if this type is an enumerated type.
 boolean isPrimitive()
          Indicates if this type is a primitive type.
 boolean isReference()
          Indicates if this type is a reference.
 boolean isVoid()
           
 String toString()
          Returns a string representation of this type.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getName

public String getName()
Returns the name of the type. This name may be fully qualified. Otherwise it belongs to the current package.

Returns:
name of the type

isPrimitive

public boolean isPrimitive()
Indicates if this type is a primitive type.

Returns:
true if this type is a primitive

isEnumeration

public boolean isEnumeration()
Indicates if this type is an enumerated type.

Returns:
true if this type is an enumeration

isConst

public boolean isConst()
Indicates if this type is a const type.

Returns:
true if this type is a const

isReference

public boolean isReference()
Indicates if this type is a reference.

Returns:
true if reference

getPointer

public int getPointer()
Indicates the number of pointer postfixes this type has.

Returns:
pointer postfixes of this type (*)

getDimension

public int getDimension()
Indicates the dimension of this type.

1 = [], 2 = [][], etc...

Returns:
dimension of this type, 0 is no dimension.

getTypes

public IType[] getTypes()
Indicates the template of this type.

Returns:
type of template

isVoid

public boolean isVoid()

getSignature

public String getSignature(String packageName,
                           Properties imports)

toString

public String toString()
Returns a string representation of this type.

Returns:
string representatoon of this type

equals

public boolean equals(Object o)
returns true is the two types are equivalent, that is after all aliasing has been done


FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.