FreeHEP API
Version v1.2.2

org.freehep.jaco.rtti
Class IType

java.lang.Object
  |
  +--org.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, getDimension and getPointer accomodate for this.

Version:
$Id: IType.java,v 1.18 2002/11/03 21:50:13 duns Exp $
Author:
Mark Donszelmann

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 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

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.

Overrides:
toString in class Object
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

Overrides:
equals in class Object

FreeHEP API
Version v1.2.2

Copyright © 2000-2003 FreeHEP, All Rights Reserved.