jasm.lang
Class JvmType.Clazz

java.lang.Object
  extended by jasm.lang.JvmType.Clazz
All Implemented Interfaces:
JvmType, JvmType.Reference, java.lang.Comparable<JvmType>
Enclosing interface:
JvmType

public static class JvmType.Clazz
extends java.lang.Object
implements JvmType.Reference

This represents a reference to a class. E.g. java.lang.String

Author:
David J. Pearce

Nested Class Summary
 
Nested classes/interfaces inherited from interface jasm.lang.JvmType
JvmType.Array, JvmType.Bool, JvmType.Byte, JvmType.Char, JvmType.Clazz, JvmType.Double, JvmType.Float, JvmType.Function, JvmType.Int, JvmType.Intersection, JvmType.Long, JvmType.Null, JvmType.Primitive, JvmType.Reference, JvmType.Short, JvmType.Variable, JvmType.Void, JvmType.Wildcard
 
Constructor Summary
JvmType.Clazz(java.lang.String pkg, java.util.List<Pair<java.lang.String,java.util.List<JvmType.Reference>>> components)
           
JvmType.Clazz(java.lang.String pkg, java.lang.String... components)
           
 
Method Summary
 int compareTo(JvmType t)
           
 java.util.List<Pair<java.lang.String,java.util.List<JvmType.Reference>>> components()
           
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 Pair<java.lang.String,java.util.List<JvmType.Reference>> lastComponent()
           
 java.lang.String pkg()
          Return the package.
 java.lang.String toString()
           
 java.util.List<JvmType.Variable> usedVariables()
           This method returns the list of generic variables used in this type.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JvmType.Clazz

public JvmType.Clazz(java.lang.String pkg,
                     java.util.List<Pair<java.lang.String,java.util.List<JvmType.Reference>>> components)

JvmType.Clazz

public JvmType.Clazz(java.lang.String pkg,
                     java.lang.String... components)
Method Detail

components

public java.util.List<Pair<java.lang.String,java.util.List<JvmType.Reference>>> components()

lastComponent

public Pair<java.lang.String,java.util.List<JvmType.Reference>> lastComponent()

pkg

public java.lang.String pkg()
Return the package. If no package, then the value is simply "", rather than null.

Returns:

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

compareTo

public int compareTo(JvmType t)
Specified by:
compareTo in interface java.lang.Comparable<JvmType>

usedVariables

public java.util.List<JvmType.Variable> usedVariables()
Description copied from interface: JvmType

This method returns the list of generic variables used in this type. So, for example, suppose we have:

 T = java.lang.ArrayList<? extends S>
 

Then, T.usedVariables()=[S].

Specified by:
usedVariables in interface JvmType
Returns:


Copyright © 2013 David J. Pearce. All Rights Reserved.