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
- classPackage :: Maybe String
- classModName :: String
- classParents :: [String]
- classIfaces :: [String]
- classConstructors :: [JavaConstructor]
- classMethods :: [JavaMethod]
- classTypeParams :: [JavaTypeParam]
- classEnum :: Bool
- classEnumConstants :: [(Int32, String)]
- classIface :: Bool
- classAnnotation :: Bool
- classAbstract :: Bool
- classFinal :: Bool
- data JavaClassType
- classType :: JavaClass -> JavaClassType
- classDependencies :: JavaClass -> [String]
- classFullName :: 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 JavaMethod = JavaMethod {
- methodName :: String
- methodName' :: String
- methodParams :: [JavaType]
- methodGenericParams :: [JavaGenericType]
- methodReturnType :: Maybe JavaType
- methodGenericReturnType :: JavaGenericType
- methodTypeParams :: [JavaTypeParam]
- methodStatic :: Bool
- methodAbstract :: Bool
- methodPublic :: Bool
- methodFinal :: Bool
- methodNative :: Bool
- methodSynchronized :: Bool
- methodDependencies :: JavaMethod -> [String]
- data JavaConstructor = JavaConstructor {}
- constructorDependencies :: JavaConstructor -> [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.
classFullName :: JavaClass -> StringSource
Derive the full name from a class definition. See also makeName
.
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.
data JavaMethod Source
The interface to a method in the Java language.
methodDependencies :: JavaMethod -> [String]Source
Return the full names of all classes that this method references in its definition.
constructorDependencies :: JavaConstructor -> [String]Source
Retrieve all classes that this constructor definition references in its parameters or generic declaration.