java-reflect-0.99: Tools for reflecting on Java classes.

Portabilitynon-portable (DeriveDataTypeable)
Stabilityprovisional
Maintainerjulian.fleischer@fu-berlin.de
Safe HaskellSafe-Inferred

Language.Java.Reflect.Types

Description

Data structures that describe the interface of Java structures such as classes, generic types, their methods, etc.

All types are instances of Data and Typeable and can therefor be used with Scrap Your Boilerplate combinators (see Data.Generics).

Synopsis

Documentation

data JavaType Source

A JavaType is either a Primitive Type, an Array, or an Object.

classDependencies :: JavaClass -> [String]Source

Calculate all classes that are referenced in any way by this class.

newtype TyVar Source

A Type variable. This is merely a name.

Constructors

TyVar 

Fields

tyVarName :: String
 

data JavaGenericType Source

Constructors

Wildcard

super X, extends X

Parameterized
java.util.ListX

Fields

jgtBasetype :: String

The full name of the base type, e.g. java.lang.Class.

jgtParameters :: [JavaGenericType]

The parameters.

GenericArray
X[]

Fields

jgtComponentType :: JavaGenericType

The base type of the generic array, e.g. java.lang.Number.

TypeVarReference
X

Fields

jgtName :: TyVar

The name of the type variable, e.g. E or X.

NotSoGeneric 

jgtType :: JavaGenericType -> JavaGenericTypeTypeSource

Get the type of a generic type.

data JavaField Source

The interface to a field in the Java language.

methodDependencies :: [JavaTypeParam] -> JavaMethod -> [String]Source

Return the full names of all classes that this method references in its definition.

constructorDependencies :: [JavaTypeParam] -> JavaConstructor -> [String]Source

Retrieve all classes that this constructor definition references in its parameters or generic declaration.

dependencies :: [JavaTypeParam] -> [(JavaType, JavaGenericType)] -> [String]Source

Discovers all types which are mentioned in a list of type declarations, using the type variables that are in scope.