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

## com.sun.msv.grammar
Class ReferenceExp

    java.lang.Object
      com.sun.msv.grammar.Expression
          com.sun.msv.grammar.ReferenceExp

All Implemented Interfaces:
  java.io.Serializable

Direct Known Subclasses:
  AttPoolClause, AttributeDeclExp, ElementDeclExp, ElementRules, HedgeRules, RedefinableExp, TagClause, TREXGrammar, XSDatatypeExp

public class ReferenceExp
extends Expression

Reference to the other expression.

In RELAX grammar, this class is used as a base class of elementRule reference and hedgeRule reference. TREX uses this class directly.

This object is created and controlled by TREXGrammar/RELAXModule object, rather than ExpressionPool. Therefore, this object is not a subject to unification.

This class can be derived. In fact, many classes derive this class.

Author:
  Kohsuke KAWAGUCHI
See Also:
  Serialized Form

Field Summary
`Expression` | `exp` child expression.
`java.lang.String` | `name` name of the referenced expression.

Fields inherited from class com.sun.msv.grammar.Expression
`anyString, epsilon, nullSet, verifierTag`

Constructor Summary
`ReferenceExp(java.lang.String name)`
`ReferenceExp(java.lang.String name, Expression exp)`

Method Summary
`boolean` | `equals(java.lang.Object o)`
`boolean` | `isDefined()` checks if this ReferenceExp is properly defined.
`java.lang.Object` | `visit(ExpressionVisitor visitor)`
`boolean` | `visit(ExpressionVisitorBoolean visitor)`
`Expression` | `visit(ExpressionVisitorExpression visitor)`
`void` | `visit(ExpressionVisitorVoid visitor)`

Methods inherited from class com.sun.msv.grammar.Expression
`getExpandedExp, hashCode, isEpsilonReducible, peelOccurence, visit, visit, visit, visit`

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

Field Detail

### exp

    public Expression exp

  child expression. Due to the possible forward reference, this variable is not available when the object is instanciated. Actual expression will be set once if the definition is parsed.

### name

    public final java.lang.String name

  name of the referenced expression. can be null for anonymously referenced expression.

Constructor Detail

### ReferenceExp

    public ReferenceExp(java.lang.String name)

### ReferenceExp

    public ReferenceExp(java.lang.String name,
                        Expression exp)

Method Detail

### isDefined

    public boolean isDefined()

  checks if this ReferenceExp is properly defined. this method is used to detect undeclared definitions. Derived classes can override this method.

### equals

    public boolean equals(java.lang.Object o)

  Specified by:
    `equals` in class `Expression`

### visit

    public final java.lang.Object visit(ExpressionVisitor visitor)

  Specified by:
    `visit` in class `Expression`

### visit

    public final Expression visit(ExpressionVisitorExpression visitor)

  Specified by:
    `visit` in class `Expression`

### visit

    public final boolean visit(ExpressionVisitorBoolean visitor)

  Specified by:
    `visit` in class `Expression`

### visit

    public final void visit(ExpressionVisitorVoid visitor)

  Specified by:
    `visit` in class `Expression`

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