Portability | non-portable (DeriveDataTypeable) |
---|---|
Stability | provisional |
Maintainer | julian.fleischer@fu-berlin.de |
Safe Haskell | Safe-Inferred |
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).
- data JavaType
- printJavaType :: JavaType -> String
- data JavaClass = JavaClass {
- className :: String
- classParents :: [String]
- classIfaces :: [String]
- classConstructors :: [JavaConstructor]
- classMethods :: [JavaMethod]
- classFields :: [JavaField]
- classTypeParams :: [JavaTypeParam]
- classEnum :: Bool
- classEnumConstants :: [(Int32, String)]
- classIface :: Bool
- classAnnotation :: Bool
- classAbstract :: Bool
- classFinal :: Bool
- data JavaClassType
- classType :: JavaClass -> JavaClassType
- classDependencies :: JavaClass -> [String]
- data JavaTypeParam = JavaTypeParam {
- paramName :: TyVar
- paramBounds :: [JavaGenericType]
- newtype TyVar = TyVar {}
- data JavaGenericType
- = Wildcard { }
- | Parameterized { }
- | GenericArray { }
- | TypeVarReference { }
- | NotSoGeneric
- data JavaGenericTypeType
- jgtType :: JavaGenericType -> JavaGenericTypeType
- data JavaField = JavaField {
- fieldName :: String
- fieldType :: (JavaType, JavaGenericType)
- fieldFinal :: Bool
- fieldStatic :: Bool
- fieldDependencies :: [JavaTypeParam] -> JavaField -> [String]
- data JavaMethod = JavaMethod {
- methodName :: String
- methodName' :: String
- methodParams :: [(JavaType, JavaGenericType)]
- methodReturnType :: (Maybe JavaType, JavaGenericType)
- methodExceptions :: [String]
- methodTypeParams :: [JavaTypeParam]
- methodStatic :: Bool
- methodAbstract :: Bool
- methodFinal :: Bool
- methodNative :: Bool
- methodSynchronized :: Bool
- methodDependencies :: [JavaTypeParam] -> JavaMethod -> [String]
- data JavaConstructor = JavaConstructor {}
- constructorDependencies :: [JavaTypeParam] -> JavaConstructor -> [String]
- dependencies :: [JavaTypeParam] -> [(JavaType, JavaGenericType)] -> [String]
Documentation
A JavaType is either a Primitive Type, an Array, or an Object.
The interface of a Java class.
JavaClass | |
|
data JavaClassType Source
classType :: JavaClass -> JavaClassTypeSource
Determines the JavaClassType
of a JavaClass
.
classDependencies :: JavaClass -> [String]Source
Calculate all classes that are referenced in any way by this class.
data JavaTypeParam Source
A Type variable declaration.
A Type variable. This is merely a name.
data JavaGenericType Source
Wildcard | |
Parameterized | java.util.ListX |
| |
GenericArray | X[] |
| |
TypeVarReference | X |
NotSoGeneric |
data JavaGenericTypeType Source
The type of a generic type.
jgtType :: JavaGenericType -> JavaGenericTypeTypeSource
Get the type of a generic type.
The interface to a field in the Java language.
JavaField | |
|
fieldDependencies :: [JavaTypeParam] -> JavaField -> [String]Source
data JavaMethod Source
The interface to a method in the Java language.
JavaMethod | |
|
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.