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​(String name, ClassNode upper, ClassNode... interfaces)
  • Method Details

    • getLubName

      public String getLubName()
    • getName

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

      public 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
    • getText

      public String getText()
      Overrides:
      getText in class ClassNode
    • getPlainNodeReference

      public ClassNode getPlainNodeReference()
      Overrides:
      getPlainNodeReference in class ClassNode