[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-core-libs-dev
Subject:    sun.reflect.generics.*
From:       Joe.Darcy () Sun ! COM (Joseph D !  Darcy)
Date:       2008-04-21 20:33:24
Message-ID: 480CFA14.1090605 () sun ! com
[Download RAW message or body]

R?mi Forax wrote:
> Hi all,
>  Is someone knows why package sun.reflect.generics is so complex ?

Because it was written by Gilad ;-)

>  This package (and subpackage) it used to reify a generics signatures
>  to a java.lang.reflect.Type tree.
>  It creates a parser, parse the signature to create an AST,
>  and use a visitor to create the tree.
> 
>  This package, contains in my opinion, lot of unecessary garbage.
>  - It creates an AST even if the Type tree can be created in one pass.
>  - A bunch of interfaces has only one implementation like Visitor.
>  - Use a visitor even if there is only one operation.
>  - Use lots of generics can be removed because only one instanciation
>    is used.

While the code is a bit elaborate compared to the minimum needed for the 
task at hand, I think it is otherwise well-structured and there are no 
plans to refactor it.

-Joe


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic