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
All Implemented Interfaces:
GroovydocHolder<AnnotatedNode>, NodeMetaDataHandler, org.objectweb.asm.Opcodes
Enclosing class:
WideningCategories

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 and 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.
  • Constructor Details

    • LowestUpperBoundClassNode

      public LowestUpperBoundClassNode​(java.lang.String name, ClassNode upper, ClassNode... interfaces)
  • Method Details

    • getLubName

      public java.lang.String getLubName()
    • getText

      public java.lang.String getText()
      Overrides:
      getText in class ClassNode
    • getName

      public java.lang.String getName()
      Overrides:
      getName in class ClassNode
    • getTypeClass

      public java.lang.Class getTypeClass()
      Description copied from class: ClassNode
      Returns the concrete class this classnode relates to. However, this method is inherently unsafe as it may return null depending on the compile phase you are using. AST transformations should never use this method directly, but rather obtain a new class node using ClassNode.getPlainNodeReference().
      Overrides:
      getTypeClass in class ClassNode
      Returns:
      the class this classnode relates to. May return null.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class ClassNode
    • asGenericsType

      public GenericsType asGenericsType()
      Overrides:
      asGenericsType in class ClassNode
    • getPlainNodeReference

      public ClassNode getPlainNodeReference()
      Overrides:
      getPlainNodeReference in class ClassNode