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

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

Language.JVM.Attribute

Contents

Description

This is the main module for accessing all kinds of Attributes.

Synopsis

Documentation

Subattributes

data BootstrapMethods r Source #

Is a list of bootstrapped methods.

Instances

Staged BootstrapMethods Source # 

Methods

stage :: LabelM m => (forall (s' :: * -> *). Staged s' => s' r -> m (s' r')) -> BootstrapMethods r -> m (BootstrapMethods r') Source #

evolve :: EvolveM m => BootstrapMethods Low -> m (BootstrapMethods High) Source #

devolve :: DevolveM m => BootstrapMethods High -> m (BootstrapMethods Low) Source #

Eq (BootstrapMethods High) Source # 
Eq (BootstrapMethods Low) Source # 
Ord (BootstrapMethods Low) Source # 
Show (BootstrapMethods High) Source # 
Show (BootstrapMethods Low) Source # 
Generic (BootstrapMethods High) Source # 
Generic (BootstrapMethods Low) Source # 
Binary (BootstrapMethods Low) Source # 
NFData (BootstrapMethods High) Source # 

Methods

rnf :: BootstrapMethods High -> () #

NFData (BootstrapMethods Low) Source # 

Methods

rnf :: BootstrapMethods Low -> () #

IsAttribute (BootstrapMethods Low) Source #

BootstrapMethods is an Attribute.

type Rep (BootstrapMethods High) Source # 
type Rep (BootstrapMethods High) = D1 * (MetaData "BootstrapMethods" "Language.JVM.Attribute.BootstrapMethods" "jvm-binary-0.1.0-JJ8Rr7ERir79pQaBJvdiXV" True) (C1 * (MetaCons "BootstrapMethods" PrefixI True) (S1 * (MetaSel (Just Symbol "methods'") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (SizedList16 (BootstrapMethod High)))))
type Rep (BootstrapMethods Low) Source # 
type Rep (BootstrapMethods Low) = D1 * (MetaData "BootstrapMethods" "Language.JVM.Attribute.BootstrapMethods" "jvm-binary-0.1.0-JJ8Rr7ERir79pQaBJvdiXV" True) (C1 * (MetaCons "BootstrapMethods" PrefixI True) (S1 * (MetaSel (Just Symbol "methods'") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (SizedList16 (BootstrapMethod Low)))))

data Code r Source #

Code contains the actual byte-code. The i type parameter is added to allow indicate the two stages of the code file, before and after access to the ConstantPool. i should be either Ref or Deref.

Instances

Staged Code Source # 

Methods

stage :: LabelM m => (forall (s' :: * -> *). Staged s' => s' r -> m (s' r')) -> Code r -> m (Code r') Source #

evolve :: EvolveM m => Code Low -> m (Code High) Source #

devolve :: DevolveM m => Code High -> m (Code Low) Source #

Eq (Code High) Source # 

Methods

(==) :: Code High -> Code High -> Bool #

(/=) :: Code High -> Code High -> Bool #

Eq (Code Low) Source # 

Methods

(==) :: Code Low -> Code Low -> Bool #

(/=) :: Code Low -> Code Low -> Bool #

Ord (Code Low) Source # 

Methods

compare :: Code Low -> Code Low -> Ordering #

(<) :: Code Low -> Code Low -> Bool #

(<=) :: Code Low -> Code Low -> Bool #

(>) :: Code Low -> Code Low -> Bool #

(>=) :: Code Low -> Code Low -> Bool #

max :: Code Low -> Code Low -> Code Low #

min :: Code Low -> Code Low -> Code Low #

Show (Code High) Source # 
Show (Code Low) Source # 

Methods

showsPrec :: Int -> Code Low -> ShowS #

show :: Code Low -> String #

showList :: [Code Low] -> ShowS #

Generic (Code High) Source # 

Associated Types

type Rep (Code High) :: * -> * #

Methods

from :: Code High -> Rep (Code High) x #

to :: Rep (Code High) x -> Code High #

Generic (Code Low) Source # 

Associated Types

type Rep (Code Low) :: * -> * #

Methods

from :: Code Low -> Rep (Code Low) x #

to :: Rep (Code Low) x -> Code Low #

Binary (Code Low) Source # 

Methods

put :: Code Low -> Put #

get :: Get (Code Low) #

putList :: [Code Low] -> Put #

NFData (Code High) Source # 

Methods

rnf :: Code High -> () #

NFData (Code Low) Source # 

Methods

rnf :: Code Low -> () #

IsAttribute (Code Low) Source #

Code is an Attribute.

type Rep (Code High) Source # 
type Rep (Code Low) Source # 

data ConstantValue r Source #

A constant value is just a index into the constant pool.

Instances

Staged ConstantValue Source # 

Methods

stage :: LabelM m => (forall (s' :: * -> *). Staged s' => s' r -> m (s' r')) -> ConstantValue r -> m (ConstantValue r') Source #

evolve :: EvolveM m => ConstantValue Low -> m (ConstantValue High) Source #

devolve :: DevolveM m => ConstantValue High -> m (ConstantValue Low) Source #

Eq (ConstantValue High) Source # 
Eq (ConstantValue Low) Source # 
Ord (ConstantValue Low) Source # 
Show (ConstantValue High) Source # 
Show (ConstantValue Low) Source # 
Generic (ConstantValue High) Source # 

Associated Types

type Rep (ConstantValue High) :: * -> * #

Generic (ConstantValue Low) Source # 

Associated Types

type Rep (ConstantValue Low) :: * -> * #

Binary (ConstantValue Low) Source # 
NFData (ConstantValue High) Source # 

Methods

rnf :: ConstantValue High -> () #

NFData (ConstantValue Low) Source # 

Methods

rnf :: ConstantValue Low -> () #

IsAttribute (ConstantValue Low) Source #

ConstantValue is an Attribute.

type Rep (ConstantValue High) Source # 
type Rep (ConstantValue High) = D1 * (MetaData "ConstantValue" "Language.JVM.Attribute.ConstantValue" "jvm-binary-0.1.0-JJ8Rr7ERir79pQaBJvdiXV" False) (C1 * (MetaCons "ConstantValue" PrefixI True) (S1 * (MetaSel (Just Symbol "constantValue") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Ref JValue High))))
type Rep (ConstantValue Low) Source # 
type Rep (ConstantValue Low) = D1 * (MetaData "ConstantValue" "Language.JVM.Attribute.ConstantValue" "jvm-binary-0.1.0-JJ8Rr7ERir79pQaBJvdiXV" False) (C1 * (MetaCons "ConstantValue" PrefixI True) (S1 * (MetaSel (Just Symbol "constantValue") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Ref JValue Low))))

data Exceptions r Source #

An Exceptions attribute is a list of references into the constant pool.

Instances

Staged Exceptions Source # 

Methods

stage :: LabelM m => (forall (s' :: * -> *). Staged s' => s' r -> m (s' r')) -> Exceptions r -> m (Exceptions r') Source #

evolve :: EvolveM m => Exceptions Low -> m (Exceptions High) Source #

devolve :: DevolveM m => Exceptions High -> m (Exceptions Low) Source #

Eq (Exceptions High) Source # 
Eq (Exceptions Low) Source # 
Ord (Exceptions Low) Source # 
Show (Exceptions High) Source # 
Show (Exceptions Low) Source # 
Generic (Exceptions High) Source # 

Associated Types

type Rep (Exceptions High) :: * -> * #

Generic (Exceptions Low) Source # 

Associated Types

type Rep (Exceptions Low) :: * -> * #

Binary (Exceptions Low) Source # 
NFData (Exceptions High) Source # 

Methods

rnf :: Exceptions High -> () #

NFData (Exceptions Low) Source # 

Methods

rnf :: Exceptions Low -> () #

IsAttribute (Exceptions Low) Source #

Exceptions is an Attribute.

type Rep (Exceptions High) Source # 
type Rep (Exceptions High) = D1 * (MetaData "Exceptions" "Language.JVM.Attribute.Exceptions" "jvm-binary-0.1.0-JJ8Rr7ERir79pQaBJvdiXV" True) (C1 * (MetaCons "Exceptions" PrefixI True) (S1 * (MetaSel (Just Symbol "exceptions") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (SizedList16 (Ref ClassName High)))))
type Rep (Exceptions Low) Source # 
type Rep (Exceptions Low) = D1 * (MetaData "Exceptions" "Language.JVM.Attribute.Exceptions" "jvm-binary-0.1.0-JJ8Rr7ERir79pQaBJvdiXV" True) (C1 * (MetaCons "Exceptions" PrefixI True) (S1 * (MetaSel (Just Symbol "exceptions") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (SizedList16 (Ref ClassName Low)))))

data LineNumberTable r Source #

The LineNumberTable is just a mapping from offsets to linenumbers.

Instances

ByteCodeStaged LineNumberTable Source # 
Eq (LineNumberTable r) Source # 
Ord (LineNumberTable r) Source # 
Show (LineNumberTable r) Source # 
Generic (LineNumberTable r) Source # 

Associated Types

type Rep (LineNumberTable r) :: * -> * #

Binary (LineNumberTable Low) Source # 
NFData (LineNumberTable r) Source # 

Methods

rnf :: LineNumberTable r -> () #

IsAttribute (LineNumberTable Low) Source #

Signature is an Attribute.

type Rep (LineNumberTable r) Source # 
type Rep (LineNumberTable r) = D1 * (MetaData "LineNumberTable" "Language.JVM.Attribute.LineNumberTable" "jvm-binary-0.1.0-JJ8Rr7ERir79pQaBJvdiXV" True) (C1 * (MetaCons "LineNumberTable" PrefixI True) (S1 * (MetaSel (Just Symbol "lineNumberTable") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (IntMap LineNumber))))

data StackMapTable r Source #

An Exceptions attribute is a list of references into the constant pool.

Instances

ByteCodeStaged StackMapTable Source # 
Eq (StackMapTable High) Source # 
Eq (StackMapTable Low) Source # 
Ord (StackMapTable Low) Source # 
Show (StackMapTable High) Source # 
Show (StackMapTable Low) Source # 
Generic (StackMapTable High) Source # 

Associated Types

type Rep (StackMapTable High) :: * -> * #

Generic (StackMapTable Low) Source # 

Associated Types

type Rep (StackMapTable Low) :: * -> * #

Binary (StackMapTable Low) Source # 
NFData (StackMapTable High) Source # 

Methods

rnf :: StackMapTable High -> () #

NFData (StackMapTable Low) Source # 

Methods

rnf :: StackMapTable Low -> () #

IsAttribute (StackMapTable Low) Source #

StackMapTable is an Attribute.

type Rep (StackMapTable High) Source # 
type Rep (StackMapTable High) = D1 * (MetaData "StackMapTable" "Language.JVM.Attribute.StackMapTable" "jvm-binary-0.1.0-JJ8Rr7ERir79pQaBJvdiXV" True) (C1 * (MetaCons "StackMapTable" PrefixI True) (S1 * (MetaSel (Just Symbol "stackMapTable") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Choice (SizedList16 (StackMapFrame Low)) [StackMapFrame High] High))))
type Rep (StackMapTable Low) Source # 
type Rep (StackMapTable Low) = D1 * (MetaData "StackMapTable" "Language.JVM.Attribute.StackMapTable" "jvm-binary-0.1.0-JJ8Rr7ERir79pQaBJvdiXV" True) (C1 * (MetaCons "StackMapTable" PrefixI True) (S1 * (MetaSel (Just Symbol "stackMapTable") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Choice (SizedList16 (StackMapFrame Low)) [StackMapFrame High] Low))))

data Signature a Source #

Instances

Staged Signature Source # 

Methods

stage :: LabelM m => (forall (s' :: * -> *). Staged s' => s' r -> m (s' r')) -> Signature r -> m (Signature r') Source #

evolve :: EvolveM m => Signature Low -> m (Signature High) Source #

devolve :: DevolveM m => Signature High -> m (Signature Low) Source #

Eq (Signature High) Source # 
Eq (Signature Low) Source # 
Ord (Signature Low) Source # 
Show (Signature High) Source # 
Show (Signature Low) Source # 
Generic (Signature High) Source # 

Associated Types

type Rep (Signature High) :: * -> * #

Generic (Signature Low) Source # 

Associated Types

type Rep (Signature Low) :: * -> * #

Binary (Signature Low) Source # 
NFData (Signature High) Source # 

Methods

rnf :: Signature High -> () #

NFData (Signature Low) Source # 

Methods

rnf :: Signature Low -> () #

IsAttribute (Signature Low) Source # 
type Rep (Signature High) Source # 
type Rep (Signature High) = D1 * (MetaData "Signature" "Language.JVM.Attribute.Signature" "jvm-binary-0.1.0-JJ8Rr7ERir79pQaBJvdiXV" False) (C1 * (MetaCons "Signature" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Ref Text High))))
type Rep (Signature Low) Source # 
type Rep (Signature Low) = D1 * (MetaData "Signature" "Language.JVM.Attribute.Signature" "jvm-binary-0.1.0-JJ8Rr7ERir79pQaBJvdiXV" False) (C1 * (MetaCons "Signature" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Ref Text Low))))