jvm-binary-0.1.0: A library for reading Java class-files

Copyright(c) Christian Gram Kalhauge 2018
LicenseMIT
Maintainerkalhuage@cs.ucla.edu
Safe HaskellSafe
LanguageHaskell2010

Language.JVM.Type

Contents

Description

This module contains the JType, ClassName, MethodDescriptor, and FieldDescriptor.

Synopsis

Base types

ClassName

newtype ClassName Source #

A class name

Constructors

ClassName 

Instances

strCls :: String -> ClassName Source #

Wrapper method that converts a string representation of a class into a class.

dotCls :: Text -> ClassName Source #

Takes the dot representation and converts it into a class.

JType

data JType Source #

The JVM types

data JBaseType Source #

The Jvm Primitive Types

Instances

Eq JBaseType Source # 
Ord JBaseType Source # 
Show JBaseType Source # 
Generic JBaseType Source # 

Associated Types

type Rep JBaseType :: * -> * #

NFData JBaseType Source # 

Methods

rnf :: JBaseType -> () #

type Rep JBaseType Source # 
type Rep JBaseType = D1 * (MetaData "JBaseType" "Language.JVM.Type" "jvm-binary-0.1.0-JJ8Rr7ERir79pQaBJvdiXV" False) ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "JTByte" PrefixI False) (U1 *)) (C1 * (MetaCons "JTChar" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "JTDouble" PrefixI False) (U1 *)) (C1 * (MetaCons "JTFloat" PrefixI False) (U1 *)))) ((:+:) * ((:+:) * (C1 * (MetaCons "JTInt" PrefixI False) (U1 *)) (C1 * (MetaCons "JTLong" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "JTShort" PrefixI False) (U1 *)) (C1 * (MetaCons "JTBoolean" PrefixI False) (U1 *)))))

MethodDescriptor

data MethodDescriptor Source #

Method Descriptor

Instances

Eq MethodDescriptor Source # 
Ord MethodDescriptor Source # 
Show MethodDescriptor Source # 
IsString MethodDescriptor Source # 
Generic MethodDescriptor Source # 
NFData MethodDescriptor Source # 

Methods

rnf :: MethodDescriptor -> () #

TypeParse MethodDescriptor Source # 
Referenceable MethodDescriptor Source # 

Methods

fromConst :: Monad m => (forall a'. String -> m a') -> Constant High -> m MethodDescriptor Source #

toConst :: Monad m => MethodDescriptor -> m (Constant High) Source #

type Rep MethodDescriptor Source # 
type Rep MethodDescriptor = D1 * (MetaData "MethodDescriptor" "Language.JVM.Type" "jvm-binary-0.1.0-JJ8Rr7ERir79pQaBJvdiXV" False) (C1 * (MetaCons "MethodDescriptor" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "methodDescriptorArguments") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [JType])) (S1 * (MetaSel (Just Symbol "methodDescriptorReturnType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe JType)))))

FieldDescriptor

newtype FieldDescriptor Source #

Field Descriptor

Constructors

FieldDescriptor 

Instances

Eq FieldDescriptor Source # 
Ord FieldDescriptor Source # 
Show FieldDescriptor Source # 
IsString FieldDescriptor Source # 
Generic FieldDescriptor Source # 
NFData FieldDescriptor Source # 

Methods

rnf :: FieldDescriptor -> () #

TypeParse FieldDescriptor Source # 
Referenceable FieldDescriptor Source # 

Methods

fromConst :: Monad m => (forall a'. String -> m a') -> Constant High -> m FieldDescriptor Source #

toConst :: Monad m => FieldDescriptor -> m (Constant High) Source #

type Rep FieldDescriptor Source # 
type Rep FieldDescriptor = D1 * (MetaData "FieldDescriptor" "Language.JVM.Type" "jvm-binary-0.1.0-JJ8Rr7ERir79pQaBJvdiXV" True) (C1 * (MetaCons "FieldDescriptor" PrefixI True) (S1 * (MetaSel (Just Symbol "fieldDescriptorType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * JType)))

NameAndType

data NameAndType a Source #

A name and a type

Constructors

NameAndType 

Fields

Instances

Eq a => Eq (NameAndType a) Source # 
Ord a => Ord (NameAndType a) Source # 
Show a => Show (NameAndType a) Source # 
TypeParse t => IsString (NameAndType t) Source # 
Generic (NameAndType a) Source # 

Associated Types

type Rep (NameAndType a) :: * -> * #

Methods

from :: NameAndType a -> Rep (NameAndType a) x #

to :: Rep (NameAndType a) x -> NameAndType a #

NFData a => NFData (NameAndType a) Source # 

Methods

rnf :: NameAndType a -> () #

TypeParse t => TypeParse (NameAndType t) Source # 
TypeParse a => Referenceable (NameAndType a) Source # 

Methods

fromConst :: Monad m => (forall a'. String -> m a') -> Constant High -> m (NameAndType a) Source #

toConst :: Monad m => NameAndType a -> m (Constant High) Source #

type Rep (NameAndType a) Source # 
type Rep (NameAndType a) = D1 * (MetaData "NameAndType" "Language.JVM.Type" "jvm-binary-0.1.0-JJ8Rr7ERir79pQaBJvdiXV" False) (C1 * (MetaCons "NameAndType" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "ntName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "ntDescriptor") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a))))