public abstract class Type extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Type.Repetition |
| Constructor and Description |
|---|
Type(String name,
Type.Repetition repetition) |
Type(String name,
Type.Repetition repetition,
OriginalType originalType) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
accept(TypeVisitor visitor)
Visits this type with the given visitor
|
GroupType |
asGroupType() |
PrimitiveType |
asPrimitiveType() |
protected abstract boolean |
containsPath(String[] path,
int depth) |
boolean |
equals(Object other) |
protected abstract int |
getMaxDefinitionLevel(String[] path,
int i) |
protected abstract int |
getMaxRepetitionLevel(String[] path,
int i) |
String |
getName() |
OriginalType |
getOriginalType() |
protected abstract List<String[]> |
getPaths(int depth) |
Type.Repetition |
getRepetition() |
protected abstract Type |
getType(String[] path,
int i) |
int |
hashCode() |
abstract boolean |
isPrimitive() |
boolean |
isRepetition(Type.Repetition rep) |
String |
toString() |
protected abstract boolean |
typeEquals(Type other) |
protected abstract int |
typeHashCode() |
abstract void |
writeToStringBuilder(StringBuilder sb,
String indent)
Writes a string representation to the provided StringBuilder
|
public Type(String name, Type.Repetition repetition)
public Type(String name, Type.Repetition repetition, OriginalType originalType)
public String getName()
public boolean isRepetition(Type.Repetition rep)
public Type.Repetition getRepetition()
public OriginalType getOriginalType()
public abstract boolean isPrimitive()
public GroupType asGroupType()
public PrimitiveType asPrimitiveType()
public abstract void writeToStringBuilder(StringBuilder sb, String indent)
sb - the StringBuilder to write itself tocurrent - indentation levelpublic abstract void accept(TypeVisitor visitor)
visitor - the visitor to visit this typeprotected abstract int typeHashCode()
protected abstract boolean typeEquals(Type other)
protected abstract int getMaxRepetitionLevel(String[] path, int i)
protected abstract int getMaxDefinitionLevel(String[] path, int i)
protected abstract boolean containsPath(String[] path, int depth)
Copyright © 2013. All Rights Reserved.