jasm.lang
Interface JvmType

All Superinterfaces:
java.lang.Comparable<JvmType>
All Known Subinterfaces:
JvmType.Primitive, JvmType.Reference
All Known Implementing Classes:
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.Short, JvmType.Variable, JvmType.Void, JvmType.Wildcard

public interface JvmType
extends java.lang.Comparable<JvmType>

Represents types used in Java programs (e.g. int, String, Object[], etc).

JKit provides classes and methods for representing and manipulating Java types (such int, String[] etc). The majority of these can be found here. For example, the Type.Int class is used to represent int types, whilst Type.Reference represents general reference types, such as java.lang.String.


Nested Class Summary
static class JvmType.Array
          The Array type captures array types! The elementType gives the types of the elements held in the array.
static class JvmType.Bool
          Represents the Java type "boolean"
static class JvmType.Byte
          Represents the Java type "byte"
static class JvmType.Char
          Represents the Java type "char"
static class JvmType.Clazz
          This represents a reference to a class.
static class JvmType.Double
          Represents the Java type "double"
static class JvmType.Float
          Represents the Java type "float"
static class JvmType.Function
          Represents the type of a method.
static class JvmType.Int
          Represents the Java type "int"
static class JvmType.Intersection
          An intersection type represents a (unknown) type which known to be a subtype of several types.
static class JvmType.Long
          Represents the Java type "long"
static class JvmType.Null
          The Null type is a special type given to the null value.
static interface JvmType.Primitive
          The Primitive type abstracts all the primitive types.
static interface JvmType.Reference
          The Reference type abstracts all the reference types, including class types, array types, variable and wildcard types.
static class JvmType.Short
          Represents the Java type "short"
static class JvmType.Variable
          Represents a Generic type variable.
static class JvmType.Void
          The Void type is used to represent "void" types, found in method declarations.
static class JvmType.Wildcard
          This represents the special "?" type.
 
Method Summary
 java.util.List<JvmType.Variable> usedVariables()
           This method returns the list of generic variables used in this type.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

usedVariables

java.util.List<JvmType.Variable> usedVariables()

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].

Returns:


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