Groovy 2.2.1

org.codehaus.groovy.ast.tools
[Java] Class WideningCategories.LowestUpperBoundClassNode

java.lang.Object
  org.codehaus.groovy.ast.ASTNode
      org.codehaus.groovy.ast.AnnotatedNode
          org.codehaus.groovy.ast.ClassNode
              org.codehaus.groovy.ast.tools.WideningCategories.LowestUpperBoundClassNode

public static class WideningCategories.LowestUpperBoundClassNode
extends ClassNode

This ClassNode specialization is used when the lowest upper bound of two types cannot be represented by an existing type. For example, if B extends A, C extends A and both C & B implement a common interface not implemented by A, then we use this class to represent the bound. At compile time, some classes like AsmClassGenerator need to know about a real class node, so we compute a "compile time" node which will be used to return a name and a type class.


Field Summary
 
Fields inherited from class ClassNode
EMPTY_ARRAY, SUPER, THIS, clazz, innerClasses, isPrimaryNode, lazyInitLock
 
Constructor Summary
WideningCategories.LowestUpperBoundClassNode(String name, ClassNode upper, ClassNode... interfaces)

 
Method Summary
String getLubName()

Compares two class nodes, but including their generics types.

String getName()

String getText()

Class getTypeClass()

int hashCode()

 
Methods inherited from class ClassNode
ClassNode, ClassNode, ClassNode, addConstructor, addConstructor, addField, addField, addFieldFirst, addFieldFirst, addInterface, addMethod, addMethod, addMixin, addObjectInitializerStatements, addProperty, addProperty, addStaticInitializerStatements, addSyntheticMethod, addTransform, declaresInterface, equals, getAbstractMethods, getAllDeclaredMethods, getAllInterfaces, getAnnotations, getAnnotations, getCompileUnit, getComponentType, getDeclaredConstructors, getDeclaredField, getDeclaredMethod, getDeclaredMethods, getDeclaredMethodsMap, getEnclosingMethod, getField, getFields, getGenericsTypes, getGetterMethod, getInnerClasses, getInterfaces, getMethod, getMethods, getMethods, getMixins, getModifiers, getModule, getName, getNameWithoutPackage, getObjectInitializerStatements, getOuterClass, getOuterField, getPackage, getPackageName, getPlainNodeReference, getProperties, getProperty, getSetterMethod, getSetterMethod, getSuperClass, getText, getTransforms, getTypeClass, getUnresolvedInterfaces, getUnresolvedInterfaces, getUnresolvedName, getUnresolvedSuperClass, getUnresolvedSuperClass, hasDeclaredMethod, hasMethod, hasPackageName, hasPossibleMethod, hasPossibleStaticMethod, hasProperty, hashCode, implementsInterface, isAnnotated, isAnnotationDefinition, isArray, isDerivedFrom, isDerivedFromGroovyObject, isEnum, isGenericsPlaceHolder, isInterface, isPrimaryClassNode, isRedirectNode, isResolved, isScript, isScriptBody, isStaticClass, isSyntheticPublic, isUsingGenerics, makeArray, parametersEqual, positionStmtsAfterEnumInitStmts, redirect, removeField, renameField, setAnnotated, setCompileUnit, setEnclosingMethod, setGenericsPlaceHolder, setGenericsTypes, setInterfaces, setModifiers, setModule, setName, setRedirect, setScript, setScriptBody, setStaticClass, setSuperClass, setSyntheticPublic, setUnresolvedSuperClass, setUsingGenerics, toString, toString, tryFindPossibleMethod, visitContents
 
Methods inherited from class AnnotatedNode
addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSynthetic
 
Methods inherited from class ASTNode
copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getNodeMetaData, getText, putNodeMetaData, removeNodeMetaData, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setNodeMetaData, setSourcePosition, visit
 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Constructor Detail

WideningCategories.LowestUpperBoundClassNode

public WideningCategories.LowestUpperBoundClassNode(String name, ClassNode upper, ClassNode... interfaces)


 
Method Detail

getLubName

public String getLubName()
Compares two class nodes, but including their generics types.
Parameters:
a
b
Returns:
true if the class nodes are equal, false otherwise


getName

@Overrideresult = result && areEqualWithGenerics(ga.getType(), gb.getType());
public String getName()


getText

@Override
public String getText()


getTypeClass

@OverrideClassNode[] upB = gb.getUpperBounds();
public Class getTypeClass()


hashCode

@Override}
public int hashCode()


 

Copyright © 2003-2013 The Codehaus. All rights reserved.