module Language.Java.Syntax.Types where
import Data.Data
import GHC.Generics (Generic)
data Type
= PrimType PrimType
| RefType RefType
deriving (Eq,Show,Read,Typeable,Generic,Data)
data RefType
= ClassRefType ClassType
| ArrayType Type
deriving (Eq,Show,Read,Typeable,Generic,Data)
data ClassType
= ClassType [(Ident, [TypeArgument])]
deriving (Eq,Show,Read,Typeable,Generic,Data)
data TypeArgument
= Wildcard (Maybe WildcardBound)
| ActualType RefType
deriving (Eq,Show,Read,Typeable,Generic,Data)
data TypeDeclSpecifier
= TypeDeclSpecifier ClassType
| TypeDeclSpecifierWithDiamond ClassType Ident Diamond
| TypeDeclSpecifierUnqualifiedWithDiamond Ident Diamond
deriving (Eq,Show,Read,Typeable,Generic,Data)
data Diamond = Diamond
deriving (Eq,Show,Read,Typeable,Generic,Data)
data WildcardBound
= ExtendsBound RefType
| SuperBound RefType
deriving (Eq,Show,Read,Typeable,Generic,Data)
data PrimType
= BooleanT
| ByteT
| ShortT
| IntT
| LongT
| CharT
| FloatT
| DoubleT
deriving (Eq,Show,Read,Typeable,Generic,Data)
data TypeParam = TypeParam Ident [RefType]
deriving (Eq,Show,Read,Typeable,Generic,Data)
data Ident = Ident String
deriving (Eq,Ord,Show,Read,Typeable,Generic,Data)
data Name = Name [Ident]
deriving (Eq,Ord,Show,Read,Typeable,Generic,Data)