This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
.gitignore | ||
| |
README.textile | ||
| |
cljtags/ | ||
| |
java-meta/ | ||
| |
playground/ | ||
| |
source-mining/ | ||
| |
validation/ |
README.textile
Type erasure removes all type meta data from Java’s byte code, this means that the following is valid in runtime:
public static void addTo(List list, Object value){
list.add(value);
}
public static void main(String [] args){
List list = new ArrayList();
addTo(list,“not legel”);// there is no way to validated this on runtime
}
This project attempts to make types meta data available in runtime by enriching the AST before the source code gets compiled.
At the moment there are two types of enrichments:
- @GenMeta annotation which is added on method input parameters:
public void twoTypeParamsMet(@GenMeta(stringRep = "((Object ()) (Object ()))", classes = { Object.class, Object.class }) Map<Object, Object> map) {
// method code
}
- Proxy meta which is added on initialization expressions (annotation on local variable are not retained) :
public static void main(String [] args) {
List<Integer> list = (List <Integer>)MetaProxy.newInstance(new ArrayList<Integer>(),"(Integer ())",new Class []{Integer.class});
}
Note that meta is added only for resolvable type (no wild card types).
Usage TBD ..








