-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Tools for reflecting on Java classes. -- -- Tools for reflecting on Java classes. @package java-reflect @version 0.9.9 -- | 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). module Language.Java.Reflect.Types -- | A JavaType is either a Primitive Type, an Array, or an Object. data JavaType JBoolean :: JavaType JChar :: JavaType JByte :: JavaType JShort :: JavaType JInt :: JavaType JLong :: JavaType JFloat :: JavaType JDouble :: JavaType JObj :: String -> JavaType typeName :: JavaType -> String JArr :: JavaType -> JavaType componentType :: JavaType -> JavaType printJavaType :: JavaType -> String -- | The interface of a Java class. data JavaClass JavaClass :: String -> [String] -> [String] -> [JavaConstructor] -> [JavaMethod] -> [JavaField] -> [JavaTypeParam] -> Bool -> [(Int32, String)] -> Bool -> Bool -> Bool -> Bool -> JavaClass className :: JavaClass -> String classParents :: JavaClass -> [String] classIfaces :: JavaClass -> [String] classConstructors :: JavaClass -> [JavaConstructor] classMethods :: JavaClass -> [JavaMethod] classFields :: JavaClass -> [JavaField] classTypeParams :: JavaClass -> [JavaTypeParam] classEnum :: JavaClass -> Bool classEnumConstants :: JavaClass -> [(Int32, String)] classIface :: JavaClass -> Bool classAnnotation :: JavaClass -> Bool classAbstract :: JavaClass -> Bool classFinal :: JavaClass -> Bool data JavaClassType Annotation :: JavaClassType Interface :: JavaClassType Enum :: JavaClassType Class :: JavaClassType Exception :: JavaClassType Error :: JavaClassType -- | Determines the JavaClassType of a JavaClass. classType :: JavaClass -> JavaClassType -- | Calculate all classes that are referenced in any way by this class. classDependencies :: JavaClass -> [String] -- | A Type variable declaration. data JavaTypeParam JavaTypeParam :: TyVar -> [JavaGenericType] -> JavaTypeParam paramName :: JavaTypeParam -> TyVar paramBounds :: JavaTypeParam -> [JavaGenericType] -- | A Type variable. This is merely a name. newtype TyVar TyVar :: String -> TyVar tyVarName :: TyVar -> String data JavaGenericType -- | super X, extends X Wildcard :: [JavaGenericType] -> [JavaGenericType] -> JavaGenericType jgtBounds :: JavaGenericType -> [JavaGenericType] jgtLowerBounds :: JavaGenericType -> [JavaGenericType] -- |
-- java.util.ListX --Parameterized :: String -> [JavaGenericType] -> JavaGenericType -- | The full name of the base type, e.g. java.lang.Class. jgtBasetype :: JavaGenericType -> String -- | The parameters. jgtParameters :: JavaGenericType -> [JavaGenericType] -- |
-- X[] --GenericArray :: JavaGenericType -> JavaGenericType -- | The base type of the generic array, e.g. java.lang.Number. jgtComponentType :: JavaGenericType -> JavaGenericType -- |
-- X --TypeVarReference :: TyVar -> JavaGenericType -- | The name of the type variable, e.g. E or X. jgtName :: JavaGenericType -> TyVar NotSoGeneric :: JavaGenericType -- | The type of a generic type. data JavaGenericTypeType WildcardT :: JavaGenericTypeType ParameterizedT :: JavaGenericTypeType GenericArrayT :: JavaGenericTypeType TypeVarReferenceT :: JavaGenericTypeType NotSoGenericT :: JavaGenericTypeType -- | Get the type of a generic type. jgtType :: JavaGenericType -> JavaGenericTypeType -- | The interface to a field in the Java language. data JavaField JavaField :: String -> (JavaType, JavaGenericType) -> Bool -> Bool -> JavaField fieldName :: JavaField -> String fieldType :: JavaField -> (JavaType, JavaGenericType) fieldFinal :: JavaField -> Bool fieldStatic :: JavaField -> Bool fieldDependencies :: [JavaTypeParam] -> JavaField -> [String] -- | The interface to a method in the Java language. data JavaMethod JavaMethod :: String -> String -> [(JavaType, JavaGenericType)] -> (Maybe JavaType, JavaGenericType) -> [String] -> [JavaTypeParam] -> Bool -> Bool -> Bool -> Bool -> Bool -> JavaMethod methodName :: JavaMethod -> String methodName' :: JavaMethod -> String methodParams :: JavaMethod -> [(JavaType, JavaGenericType)] methodReturnType :: JavaMethod -> (Maybe JavaType, JavaGenericType) methodExceptions :: JavaMethod -> [String] methodTypeParams :: JavaMethod -> [JavaTypeParam] methodStatic :: JavaMethod -> Bool methodAbstract :: JavaMethod -> Bool methodFinal :: JavaMethod -> Bool methodNative :: JavaMethod -> Bool methodSynchronized :: JavaMethod -> Bool -- | Return the full names of all classes that this method references in -- its definition. methodDependencies :: [JavaTypeParam] -> JavaMethod -> [String] -- | A Constructor in the Java language. data JavaConstructor JavaConstructor :: [(JavaType, JavaGenericType)] -> [String] -> [JavaTypeParam] -> JavaConstructor constructorParams :: JavaConstructor -> [(JavaType, JavaGenericType)] constructorExceptions :: JavaConstructor -> [String] constructorTypeParams :: JavaConstructor -> [JavaTypeParam] -- | Retrieve all classes that this constructor definition references in -- its parameters or generic declaration. constructorDependencies :: [JavaTypeParam] -> JavaConstructor -> [String] -- | Discovers all types which are mentioned in a list of type -- declarations, using the type variables that are in scope. dependencies :: [JavaTypeParam] -> [(JavaType, JavaGenericType)] -> [String] instance Typeable JavaType instance Typeable JavaClassType instance Typeable TyVar instance Typeable JavaGenericType instance Typeable JavaTypeParam instance Typeable JavaField instance Typeable JavaMethod instance Typeable JavaConstructor instance Typeable JavaClass instance Eq JavaType instance Ord JavaType instance Show JavaType instance Read JavaType instance Data JavaType instance Eq JavaClassType instance Ord JavaClassType instance Show JavaClassType instance Read JavaClassType instance Data JavaClassType instance Eq TyVar instance Ord TyVar instance Show TyVar instance Read TyVar instance Data TyVar instance Eq JavaGenericType instance Ord JavaGenericType instance Show JavaGenericType instance Read JavaGenericType instance Data JavaGenericType instance Eq JavaTypeParam instance Ord JavaTypeParam instance Show JavaTypeParam instance Read JavaTypeParam instance Data JavaTypeParam instance Eq JavaField instance Show JavaField instance Read JavaField instance Data JavaField instance Eq JavaMethod instance Show JavaMethod instance Read JavaMethod instance Data JavaMethod instance Eq JavaConstructor instance Show JavaConstructor instance Read JavaConstructor instance Data JavaConstructor instance Eq JavaClass instance Show JavaClass instance Read JavaClass instance Data JavaClass -- | Methods for reflecting Java classes using a JVM as source of -- information. module Language.Java.Reflect -- | Creates a function which can be used to gather reflection information -- about classes identified by their binary name (e.g. -- java.lang.Thread$State). getReflectClasses :: Java (Bool -> [String] -> Java (Map String JavaClass))