Hi Gunnar,
On 17/12/2016 2:18 AM, Gunnar Morling wrote:
Hi,
I'd like to suggest the addition of a type token class to the Java
class library, to be used for representing generic types such as
List.
Sounds like something that falls within scope for the generic
specialization work in Project
> On Dec 16, 2016, at 8:18 AM, Gunnar Morling <gun...@hibernate.org> wrote:
>
> Hi,
>
> I'd like to suggest the addition of a type token class to the Java
> class library, to be used for representing generic types such as
> List.
I don't have much clout on this list
Hi,
I'd like to suggest the addition of a type token class to the Java
class library, to be used for representing generic types such as
List.
Actual class literals can only represent raw types. But often
libraries have the need to apply some sort of configuration to
specific generic types, link
name for this.
Currently, you can determine if a class is an interface, annotation,
primitive or array, leaving the normal case as a quadruple negative.
This leaves such a user-written method vulnerable to any new type of
class that gets added in a future JDK:
boolean isNormalClass(Class cls
On 21 February 2014 08:14, David Holmes david.hol...@oracle.com wrote:
Would it be reasonable to add the following methods:
- isNestedClass()
This would be !isTopLevelClass() but otherwise
isAnonymousClass() || isLocalClass() || isMemberClass()
- isInnerClass()
isAnonymousClass() ||
I understand why you want this, though I think you’ll find that there are still
thousands of other things “missing” from reflection.
In the Java 1.0 days, the difference between the Java language and the class
file was pretty small. So reflection served as both the class file (VM)
On 02/21/2014 07:40 AM, Brian Goetz wrote:
I understand why you want this, though I think you’ll find that there are still
thousands of other things “missing” from reflection.
In the Java 1.0 days, the difference between the Java language and the class
file was pretty small. So reflection
But is javax.lang.model a plan for JDK 9?
To give some idea of the pain in this area, here is the code I ended up with:
if (type.isInterface() || type.isAnnotation() || type.isPrimitive() ||
type.isArray() || type.isEnum() || type.isSynthetic() ||
Modifier.isAbstract(type.getModifiers()) ||
of an isNormalClass() -
probably a better name for this.
Currently, you can determine if a class is an interface, annotation,
primitive or array, leaving the normal case as a quadruple negative.
This leaves such a user-written method vulnerable to any new type of
class that gets added in a future