| Modifier and Type | Field and Description |
|---|---|
private AbstractRefState |
state
The state if the reference is resolved or not.
|
| Constructor and Description |
|---|
RegExRefPart(AbstractRefState state)
Constructor, just sets fields.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(RegExPartVisitor vis)
accept method for visitor pattern.
|
boolean |
equals(java.lang.Object obj) |
AbstractRefState |
getState()
Returns the field state.
|
int |
hashCode() |
void |
resolve(NamedVariableType variableType)
Changes the state to RefResState with the given type.
|
void |
setState(AbstractRefState state)
Sets a new state.
|
java.lang.String |
toStringResolved()
Returns the resolved string of the regexpart , withOUT references like (RE:LABEL).
|
java.lang.String |
toStringUnresolved()
Returns the unresolved string of the regexpart, with references like (RE:LABEL).
|
private AbstractRefState state
public RegExRefPart(AbstractRefState state)
state - The state to set.public void setState(AbstractRefState state)
state - The state to set.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic AbstractRefState getState()
public void resolve(NamedVariableType variableType) throws ReferenceIsUnresolvedException
variableType - The Type to set.ReferenceIsUnresolvedException - If a part of the type is unresolved.public java.lang.String toStringResolved()
throws ReferenceIsUnresolvedException
RegExParttoStringResolved in interface RegExPartReferenceIsUnresolvedException - If a part is unresolved.public java.lang.String toStringUnresolved()
RegExParttoStringUnresolved in interface RegExPartpublic void accept(RegExPartVisitor vis) throws TypeDoesNotExistException, TypeExceptions
RegExPartaccept in interface RegExPartvis - the visitor.TypeDoesNotExistException - if a part is not resolvableTypeExceptions - if a cycle is detected