mirror of
https://github.com/adelphes/android-dev-ext.git
synced 2025-12-23 09:59:25 +00:00
map primitive types to their boxed versions for class member
This commit is contained in:
@@ -2075,8 +2075,15 @@ function parseDottedIdent(matches, tokens, typemap) {
|
|||||||
// e.g int.class
|
// e.g int.class
|
||||||
// convert the types to Class instances
|
// convert the types to Class instances
|
||||||
tokens.inc();
|
tokens.inc();
|
||||||
|
const prim_map = {
|
||||||
|
B:'Byte',S:'Short',I:'Integer',J:'Long',F:'Float',D:'Double',C:'Character',Z:'Boolean',V:'Void',
|
||||||
|
}
|
||||||
variables = matches.types.map(t => {
|
variables = matches.types.map(t => {
|
||||||
const type_signature = t instanceof AnyType ? '' : `<${t.typeSignature}>`
|
const type_signature = t instanceof AnyType
|
||||||
|
? ''
|
||||||
|
: t instanceof PrimitiveType
|
||||||
|
? `<Ljava/lang/${prim_map[t.typeSignature]};>`
|
||||||
|
: `<${t.typeSignature}>`
|
||||||
return new Value(qualified_ident, signatureToType(`Ljava/lang/Class${type_signature};`, typemap));
|
return new Value(qualified_ident, signatureToType(`Ljava/lang/Class${type_signature};`, typemap));
|
||||||
});
|
});
|
||||||
return new ResolvedIdent(qualified_ident, variables);
|
return new ResolvedIdent(qualified_ident, variables);
|
||||||
|
|||||||
Reference in New Issue
Block a user