Class Type
java.lang.Object
org.fife.rsta.ac.java.rjc.lang.Type
A type.
Type:
Identifier [TypeArguments] { . Identifier [TypeArguments] } {[]}
BasicType
- Version:
- 1.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddIdentifier(String identifier, List<TypeArgument> typeArgs) Adds an identifier to this type.intgetName(boolean fullyQualified) Returns the name of this type.getName(boolean fullyQualified, boolean addTypeArgs) Returns the name of this type.getTypeArguments(int index) Returns a set of type arguments by index.voidincrementBracketPairCount(int count) Increments an internally-used count of bracket pairs.booleanisArray()Returns whether this type is an array.booleanReturns whether this is a basic type (e.g.voidsetBracketPairCount(int count) toString()Returns a string representation of this type.
-
Field Details
-
identifiers
-
typeArguments
-
bracketPairCount
private int bracketPairCount
-
-
Constructor Details
-
Type
public Type() -
Type
-
Type
-
-
Method Details
-
addIdentifier
Adds an identifier to this type.- Parameters:
identifier- The identifier.typeArgs- The type arguments for the identifier. This may benullor an empty list if there are none.
-
getIdentifierCount
public int getIdentifierCount() -
getName
Returns the name of this type.- Parameters:
fullyQualified- Whether the returned value should be fully qualified.- Returns:
- The name of this type. This will include type arguments, if any.
- See Also:
-
getName
Returns the name of this type.- Parameters:
fullyQualified- Whether the returned value should be fully qualified.addTypeArgs- Whether type arguments should be at the end of the returned string, if any.- Returns:
- The name of this type.
- See Also:
-
getTypeArguments
Returns a set of type arguments by index.- Parameters:
index- The index.- Returns:
- The type arguments.
-
incrementBracketPairCount
public void incrementBracketPairCount(int count) Increments an internally-used count of bracket pairs.- Parameters:
count- The amount to increment by.
-
isArray
public boolean isArray()Returns whether this type is an array.- Returns:
- Whether this type is an array.
-
isBasicType
public boolean isBasicType()Returns whether this is a basic type (e.g. a primitive type).- Returns:
- Whther this is a basic type.
-
setBracketPairCount
public void setBracketPairCount(int count) -
toString
-