Package org.codehaus.groovy.ast
Class GenericsType
- java.lang.Object
- 
- org.codehaus.groovy.ast.ASTNode
- 
- org.codehaus.groovy.ast.GenericsType
 
 
- 
- All Implemented Interfaces:
- NodeMetaDataHandler
 
 public class GenericsType extends ASTNode This class is used to describe generic type signatures for ClassNodes.- See Also:
- ClassNode
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classGenericsType.GenericsTypeNameRepresents GenericsType name TODO In order to distinguish GenericsType with same name(See GROOVY-8409), we should add a property to keep the declaring class.
 - 
Field SummaryFields Modifier and Type Field Description static GenericsType[]EMPTY_ARRAY
 - 
Constructor SummaryConstructors Constructor Description GenericsType(ClassNode basicType)GenericsType(ClassNode type, ClassNode[] upperBounds, ClassNode lowerBound)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassNodegetLowerBound()StringgetName()ClassNodegetType()ClassNode[]getUpperBounds()booleanisCompatibleWith(ClassNode classNode)Compares this generics type with the provided class node.booleanisPlaceholder()booleanisResolved()booleanisWildcard()voidsetName(String name)voidsetPlaceholder(boolean placeholder)voidsetResolved(boolean resolved)voidsetType(ClassNode type)voidsetWildcard(boolean wildcard)StringtoString()- 
Methods inherited from class org.codehaus.groovy.ast.ASTNodecopyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, getText, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePosition, visit
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.codehaus.groovy.ast.NodeMetaDataHandlercopyNodeMetaData, getNodeMetaData, getNodeMetaData, getNodeMetaData, putNodeMetaData, removeNodeMetaData, setNodeMetaData
 
- 
 
- 
- 
- 
Field Detail- 
EMPTY_ARRAYpublic static final GenericsType[] EMPTY_ARRAY 
 
- 
 - 
Method Detail- 
getTypepublic ClassNode getType() 
 - 
setTypepublic void setType(ClassNode type) 
 - 
getNamepublic String getName() 
 - 
setNamepublic void setName(String name) 
 - 
isResolvedpublic boolean isResolved() 
 - 
setResolvedpublic void setResolved(boolean resolved) 
 - 
isPlaceholderpublic boolean isPlaceholder() 
 - 
setPlaceholderpublic void setPlaceholder(boolean placeholder) 
 - 
isWildcardpublic boolean isWildcard() 
 - 
setWildcardpublic void setWildcard(boolean wildcard) 
 - 
getLowerBoundpublic ClassNode getLowerBound() 
 - 
getUpperBoundspublic ClassNode[] getUpperBounds() 
 - 
isCompatibleWithpublic boolean isCompatibleWith(ClassNode classNode) Compares this generics type with the provided class node. If the provided class node is compatible with the generics specification, returns true. Otherwise, returns false. The check is complete, meaning that nested generics are also checked.- Returns:
- if classNodeis or is not compatible with this generics specification
 
 
- 
 
-