Overview | Package | Class | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.openorb.compiler.object
Class IdlObject

    java.lang.Object
      |
      +--org.openorb.compiler.object.IdlObject

All Implemented Interfaces:
  idlObject, java.io.Serializable

Direct Known Subclasses:
  IdlArray, IdlAttribute, IdlConst, IdlContext, IdlEnum, IdlEnumMember, IdlExcept, IdlFactory, IdlFactoryMember, IdlFixed, IdlIdent, IdlImport, IdlInclude, IdlInterface, IdlModule, IdlNative, IdlOp, IdlParam, IdlRaises, IdlRoot, IdlSequence, IdlSimple, IdlStateMember, IdlString, IdlStruct, IdlStructMember, IdlTypeDef, IdlUnion, IdlUnionMember, IdlValue, IdlValueBox, IdlValueInheritance, IdlWString

public class IdlObject
extends java.lang.Object
implements java.io.Serializable, idlObject

This class represents a generic type of IDL objects. IDL objects are e.g. modules, interfaces, etc. The IdlCompiler is creating an in memory tree of an IDL file where each tree element is of type IdlObject.

Version:
  $Revision: 1.9 $ $Date: 2002/08/21 08:19:22 $
Author:
  Jerome Daniel
See Also:
  Serialized Form

Field Summary
`static boolean` | `_case_sensitive` Flag whether a case-sensitive mode for comparison is in effect.
`IdlComment` | `_comment` Comment associated with the object.
`int` | `_current` Current position in the child object list.
`boolean` | `_diese` Implique la mise entre #ifndef du symbole
`boolean` | `_has_inheritance` Must be set to true if this object can have inheritance.
`java.lang.String` | `_id` ID of the object.
`boolean` | `_import` Flag qui precise si l'objet est importe
`boolean` | `_is_container` Must be set to true if this object is a container.
`java.util.Vector` | `_list` List of child objects.
`boolean` | `_map` This flag indicates whether the IDL object is defined in an included IDL file.
`java.lang.String` | `_name` Name of the object.
`java.lang.Object` | `_opaque` This field is used by the JavaToIdl compiler to attach any additional information to an IDL object.
`java.lang.String` | `_prefix` CORBA Object prefix.
`boolean` | `_prefix_explicit` Is TypeId used for this object ?
`int` | `_type` Type value, accessible via kind methods.
`boolean` | `_underscore` Y a t'il un underscore
`IdlObject` | `_upper` The parent object.
`static boolean` | `adaptName` This flag is used to set whether the name must be adapted ( '_' is removed ).
`static java.lang.String` | `idlPrefix` Prefix of the IDL object.

Constructor Summary
`IdlObject(int type, IdlObject father)` Constructor

Method Summary
`java.lang.String` | `adaptName(java.lang.String name)` If the adaptName flag is set remove a leading underscore.
`void` | `addIdlObject(IdlObject obj)` Ajoute un objet supplementaire comme contenu de cet objet
`void` | `applyPrefix(java.lang.String prefix)` Apply a prefix
`void` | `attach_comment()` Attach a default comment to this object.
`void` | `attach_comment(IdlComment comment)` Attach the specified comment to this object.
`void` | `changePrefix(java.lang.String prefix)` Change prefix to my self but also to all contained objects
`boolean` | `contains(int type)` Permet de tester la possession d'un type dans un autre
`boolean` | `containsObject(int type)` Return TRUE if this object contains a object type
`java.util.Enumeration` | `content()` Return this idlObject content
`IdlObject` | `current()` Retourne l'objet courant de la liste des sous-objets
`boolean` | `end()` Retourve Vrai dans le cas ou l'on a atteint la fin de la liste des sous-objets
`java.util.Enumeration` | `filter(int type)` Return this idlObject content with a filter
`int` | `final_kind()` Return the type of the final object.
`IdlObject` | `final_object()` Return the final object.
`IdlComment` | `getComment()` Return the comment attached to this object.
`java.lang.String` | `getId()` Return the id of the IDL object.
`java.lang.String[]` | `getIdComponents()` Return the components of the ID
`java.lang.String` | `getPrefix()` Return the IDL object prefix.
`int` | `getPrefixDepth()` Return the prefix depth
`boolean` | `hasComment()` Check whether this IDL object has a comment attached.
`int` | `idlConcreteType()` Return the concrete type ( if IDENTIFIER or TYPEDEF then returns the associated idl object )
`idlObject` | `idlDefinedIn()` Return the defined in object
`int` | `idlFinalType()` Return the final type ( if IDENTIFIER then returns the associated idl object )
`java.lang.String` | `idlID()` Return the IDL ID
`java.lang.String` | `idlName()` Return the object name
`int` | `idlType()` Return the object type
`boolean` | `included()` Indique si l'objet courant est defini dans un fichier inclus
`void` | `insertIdlObject(IdlObject obj, int idx)` Insert un element
`boolean` | `into(int type)` Permet de tester l'inclusion d'un type dans un autre
`boolean` | `isDefined(java.lang.String name, boolean scoped)` Retourne VRAI si l'identificateur passe est deja utilise pour un autre symbole.
`boolean` | `isSame(java.lang.String name)` This method returns true if this object is the same as the given name.
`boolean` | `isVisible(java.lang.String name_, boolean scoped)` Retourne VRAI si l'identificateur passe est deja utilise pour un autre symbole.
`int` | `kind()` Return the type of the IDL object.
`int` | `length()` Retourne le nombre de sous-objets
`IdlObject` | `myScope(java.lang.String scope_name, int level)` Return the scope of an object.
`java.lang.String` | `name()` Return the name of the IDL object.
`void` | `name(java.lang.String s)` Set the name of the IDL object.
`java.util.Vector` | `nameToSequence(java.lang.String name)` Returns a sequence of identifiers given a supplied name .
`void` | `next()` Passe a la position suivante dans la liste des sous-objets
`java.lang.Object` | `opaque()` Return the opaque object for ths IDL object.
`void` | `opaque(java.lang.Object op)` Set the opaque object for this IDL object.
`int` | `pos()` Retourne la position courante dans la liste des sous-objets
`void` | `pos(int p)` Fixe la position courante dans la liste des sous-objets
`void` | `refreshIncluded()` Recalcul si l'objet courant est defini dans un fichier inclus
`void` | `reset()` Initialise la position courante de la liste des sous-objets
`IdlObject` | `returnInheritedObject(java.lang.String name)` This method returns an inherited object
`IdlObject` | `returnObject(java.lang.String name_, boolean scoped)` Cette methode retourne l'objet demande en fonction de son nom.
`IdlObject` | `returnVisibleObject(java.lang.String name_, boolean scoped)` Cette methode retourne l'objet demande en fonction de son nom.
`IdlRoot` | `root()` Return the root IDL object.
`IdlObject` | `sameAs(java.lang.String name)` Return the equivalent object for the given name
`IdlObject` | `search(java.util.Vector seq, boolean scoped)` Recherche un symbole au moyen du chemin defini sous forme d'une sequence
`IdlObject` | `searchObject(java.lang.String name)` This method returns an contained object
`void` | `sensitive(boolean s)` Set the case sensitive mode to the passed value.
`void` | `setId(java.lang.String id)` Set the id of the IDL object.
`IdlObject` | `switchFinalObject(IdlObject obj)` Retourne l'objet correspondant au type du switch dans le cas d'une union.
`IdlObject` | `type()` Return the member type.
`void` | `type(IdlObject tp)` Set the type of the object.
`IdlObject` | `upper()` Return the parent IDL object.
`boolean` | `use_diese()` Retourne si une section #ifndef est a utiliser
`void` | `use_diese(boolean s)` Permet de fixer le fait de l'utilisation de #ifndef

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### _type

    public int _type

  Type value, accessible via kind methods. (@see IdlType, kind).

### _upper

    public IdlObject _upper

  The parent object.

### adaptName

    public static boolean adaptName

  This flag is used to set whether the name must be adapted ( '_' is removed ).

### idlPrefix

    public static java.lang.String idlPrefix

  Prefix of the IDL object.

### _prefix

    public java.lang.String _prefix

  CORBA Object prefix.

### _name

    public java.lang.String _name

  Name of the object.

### _id

    public java.lang.String _id

  ID of the object.

### _list

    public java.util.Vector _list

  List of child objects.

### _current

    public int _current

  Current position in the child object list.

### _map

    public boolean _map

  This flag indicates whether the IDL object is defined in an included IDL file.

### _comment

    public IdlComment _comment

  Comment associated with the object.

### _diese

    public boolean _diese

  Implique la mise entre #ifndef du symbole

### _case_sensitive

    public static boolean _case_sensitive

  Flag whether a case-sensitive mode for comparison is in effect. When this is true all name comparisons are done in upper case.

### _opaque

    public java.lang.Object _opaque

  This field is used by the JavaToIdl compiler to attach any additional information to an IDL object. E.g. exceptions where the IDL name is package::MyExEx and the Java name is just package.MyEx, the _opaque field holds the name package.MyEx in this case. In the getter/setter method case the whole name, including the prefix, is stored in the field. The type is java.lang.Object so that any kind of object can be associated with this IDL object. In the JavaToIdl case the opaque object is always of type String.

### _import

    public boolean _import

  Flag qui precise si l'objet est importe

### _underscore

    public boolean _underscore

  Y a t'il un underscore

### _prefix_explicit

    public boolean _prefix_explicit

  Is TypeId used for this object ?

### _has_inheritance

    public boolean _has_inheritance

  Must be set to true if this object can have inheritance.

### _is_container

    public boolean _is_container

  Must be set to true if this object is a container.

Constructor Detail

### IdlObject

    public IdlObject(int type,
                     IdlObject father)

  Constructor
  Parameters:
    `type` - type of the IDL object.
    `father` - parent object

Method Detail

### switchFinalObject

    public IdlObject switchFinalObject(IdlObject obj)

  Retourne l'objet correspondant au type du switch dans le cas d'une union.
  Parameters:
    `l'objet` - union
  Returns:
    l'objet du switch

### name

    public void name(java.lang.String s)

  Set the name of the IDL object.

### name

    public java.lang.String name()

  Return the name of the IDL object.

### upper

    public IdlObject upper()

  Return the parent IDL object.

### kind

    public int kind()

  Return the type of the IDL object.

### final_kind

    public int final_kind()

  Return the type of the final object. If the IDL object is either a typedef or an identifier this method returns the actual type of the IDL object.

### final_object

    public IdlObject final_object()

  Return the final object. If the IDL object is either a typedef or an identifier this method returns the actual IDL object.

### getPrefix

    public java.lang.String getPrefix()

  Return the IDL object prefix.

### setId

    public void setId(java.lang.String id)

  Set the id of the IDL object.

### getId

    public java.lang.String getId()

  Return the id of the IDL object.

### getPrefixDepth

    public int getPrefixDepth()

  Return the prefix depth

### getIdComponents

    public java.lang.String[] getIdComponents()

  Return the components of the ID

### pos

    public int pos()

  Retourne la position courante dans la liste des sous-objets
  Returns:
    la position courante

### pos

    public void pos(int p)

  Fixe la position courante dans la liste des sous-objets
  Parameters:
    `p` - la position courante

### reset

    public void reset()

  Initialise la position courante de la liste des sous-objets

### end

    public boolean end()

  Retourve Vrai dans le cas ou l'on a atteint la fin de la liste des sous-objets
  Returns:
    VRAI si le parcours est fini

### length

    public int length()

  Retourne le nombre de sous-objets
  Returns:
    le nombre de sous objets

### current

    public IdlObject current()

  Retourne l'objet courant de la liste des sous-objets
  Returns:
    l'objet courant

### next

    public void next()

  Passe a la position suivante dans la liste des sous-objets

### included

    public boolean included()

  Indique si l'objet courant est defini dans un fichier inclus
  Specified by:
    `included` in interface `idlObject`
  Returns:
    VRAI si l'objet est inclus

### refreshIncluded

    public void refreshIncluded()

  Recalcul si l'objet courant est defini dans un fichier inclus

### nameToSequence

    public java.util.Vector nameToSequence(java.lang.String name)

  Returns a sequence of identifiers given a supplied name . The supplied name (in the form value:value:value) is reutnred as a vector of Strings corresponding to the the value elements of the name.
  Parameters:
    `name` - a String
  Returns:
    a `Vector` of matching identifiers.

### search

    public IdlObject search(java.util.Vector seq,
                            boolean scoped)

  Recherche un symbole au moyen du chemin defini sous forme d'une sequence
  Parameters:
    `la` - sequence de noms
  Returns:
    l'objet trouve

### myScope

    public IdlObject myScope(java.lang.String scope_name,
                             int level)

  Return the scope of an object.
  Parameters:
    `scope_name` -
    `level` -

### isVisible

    public boolean isVisible(java.lang.String name_,
                             boolean scoped)

  Retourne VRAI si l'identificateur passe est deja utilise pour un autre symbole.
  Parameters:
    `name` - le nom a verifier
    `scoped` - mettre a vrai si l'on restraint la recherche au scope de l'objet
  Returns:
    retourne VRAI si l'identificateur est deja utilise

### returnVisibleObject

    public IdlObject returnVisibleObject(java.lang.String name_,
                                         boolean scoped)

  Cette methode retourne l'objet demande en fonction de son nom.
  Parameters:
    `name` - le nom de l'objet a retourner
    `scoped` - mettre a vrai si l'on restraint la recherche au scope de l'objet
  Returns:
    l'objet demande

### isDefined

    public boolean isDefined(java.lang.String name,
                             boolean scoped)

  Retourne VRAI si l'identificateur passe est deja utilise pour un autre symbole.
  Parameters:
    `name` - le nom a verifier
    `scoped` - mettre a vrai si l'on restraint la recherche au scope de l'objet
  Returns:
    retourne VRAI si l'identificateur est deja utilise

### returnObject

    public IdlObject returnObject(java.lang.String name_,
                                  boolean scoped)

  Cette methode retourne l'objet demande en fonction de son nom.
  Parameters:
    `name` - le nom de l'objet a retourner
    `scoped` - mettre a vrai si l'on restraint la recherche au scope de l'objet
  Returns:
    l'objet demande

### addIdlObject

    public void addIdlObject(IdlObject obj)

  Ajoute un objet supplementaire comme contenu de cet objet

### insertIdlObject

    public void insertIdlObject(IdlObject obj,
                                int idx)

  Insert un element

### root

    public IdlRoot root()

  Return the root IDL object.

### into

    public boolean into(int type)

  Permet de tester l'inclusion d'un type dans un autre
  Parameters:
    `type` - Le type conteneur
  Returns:
    true si l'objet est inclus dans le conteneur specifie

### contains

    public boolean contains(int type)

  Permet de tester la possession d'un type dans un autre
  Parameters:
    `type` - Le type conteneur
  Returns:
    true si l'objet est inclus dans le conteneur specifie

### type

    public IdlObject type()

  Return the member type. This method actually returns the first element from the child list. The method name is very confusing as it conflicts with the _type member.
  Returns:
    The object type !? (The first child object).

### type

    public void type(IdlObject tp)

  Set the type of the object. This method removes all child objects and adds the specified as new child.
  Parameters:
    `tp` - The type of the object !? (The first child member).

### attach_comment

    public void attach_comment()

  Attach a default comment to this object. IdlParser.idl_comment is used per default.

### attach_comment

    public void attach_comment(IdlComment comment)

  Attach the specified comment to this object.

### getComment

    public IdlComment getComment()

  Return the comment attached to this object.

### hasComment

    public boolean hasComment()

  Check whether this IDL object has a comment attached.

### sensitive

    public void sensitive(boolean s)

  Set the case sensitive mode to the passed value.

### use_diese

    public void use_diese(boolean s)

  Permet de fixer le fait de l'utilisation de #ifndef

### use_diese

    public boolean use_diese()

  Retourne si une section #ifndef est a utiliser

### opaque

    public void opaque(java.lang.Object op)

  Set the opaque object for this IDL object.

### opaque

    public java.lang.Object opaque()

  Return the opaque object for ths IDL object.

### applyPrefix

    public void applyPrefix(java.lang.String prefix)

  Apply a prefix

### changePrefix

    public void changePrefix(java.lang.String prefix)

  Change prefix to my self but also to all contained objects

### returnInheritedObject

    public IdlObject returnInheritedObject(java.lang.String name)

  This method returns an inherited object

### isSame

    public boolean isSame(java.lang.String name)

  This method returns true if this object is the same as the given name.

### sameAs

    public IdlObject sameAs(java.lang.String name)

  Return the equivalent object for the given name

### searchObject

    public IdlObject searchObject(java.lang.String name)

  This method returns an contained object

### adaptName

    public java.lang.String adaptName(java.lang.String name)

  If the adaptName flag is set remove a leading underscore.
  Parameters:
    `name` - which should be adapted.
  Returns:
    adatped name.

### idlName

    public java.lang.String idlName()

  Description copied from interface: `idlObject`
  Return the object name
  Specified by:
    `idlName` in interface `idlObject`

### idlID

    public java.lang.String idlID()

  Description copied from interface: `idlObject`
  Return the IDL ID
  Specified by:
    `idlID` in interface `idlObject`

### idlDefinedIn

    public idlObject idlDefinedIn()

  Description copied from interface: `idlObject`
  Return the defined in object
  Specified by:
    `idlDefinedIn` in interface `idlObject`

### idlType

    public int idlType()

  Description copied from interface: `idlObject`
  Return the object type
  Specified by:
    `idlType` in interface `idlObject`

### content

    public java.util.Enumeration content()

  Description copied from interface: `idlObject`
  Return this idlObject content
  Specified by:
    `content` in interface `idlObject`

### filter

    public java.util.Enumeration filter(int type)

  Description copied from interface: `idlObject`
  Return this idlObject content with a filter
  Specified by:
    `filter` in interface `idlObject`

### containsObject

    public boolean containsObject(int type)

  Description copied from interface: `idlObject`
  Return TRUE if this object contains a object type
  Specified by:
    `containsObject` in interface `idlObject`

### idlFinalType

    public int idlFinalType()

  Description copied from interface: `idlObject`
  Return the final type ( if IDENTIFIER then returns the associated idl object )
  Specified by:
    `idlFinalType` in interface `idlObject`

### idlConcreteType

    public int idlConcreteType()

  Description copied from interface: `idlObject`
  Return the concrete type ( if IDENTIFIER or TYPEDEF then returns the associated idl object )
  Specified by:
    `idlConcreteType` in interface `idlObject`

Overview | Package | Class | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD