About javaRuntype

Where does javaRuntype come from? Is it made or backed by any software company?

javaRuntype is Open Source Software created by a Spanish Software Engineer called Daniel Fernández in his spare time.

It is neither made nor backed by any software (or any other type of) company, and it is offered to the public totally free of charge, both in binary and in source code forms, under the Apache License 2.0.

[top]


What is javaRuntype's relation to the op4j project?

javaRuntype was conceived at first as a part of the op4j project [http://www.op4j.org], and by the same person who created op4j itself, but later during op4j's development it was decided that javaRuntype should be a project of its own as its range of application by separate was in fact quite broad.

So, javaRuntype remains today as a useful and required dependency for op4j, but it can also be used without op4j at all for several different purposes.

[top]


Is it stable? Can it be considered production-ready?

Yes, all of its non-beta releases can be considered stable and production-ready.

[top]


Does javaRuntype offer any type of commercial support?

No, it does not.

[top]


How can I contribute to javaRuntype?

In many ways:

  • You can write to the Team with your ideas for improving javaRuntype.
  • You can contribute some code, write a patch for a new feature or behaviour (please, tell the project admins first about your idea so that effort can be correctly coordinated).
  • You can write articles, reviews, blog posts, etc. about javaRuntype, showing how it works or how it integrates with other technologies.
  • You can promote javaRuntype in your company/work and among your colleague developers.

If you want to contribute some code to javaRuntype, please read first the page on Contributing to javaRuntype.

[top]

General

What is javaRuntype useful for?

javaRuntype is mainly useful for metadata systems, in order to be able to declare types for objects in a complete way, retaining in runtime the same features that Java types offer in compile time.

[top]


Which is the difference between using javaRuntype's Types and standard java.lang.Class objects?

Standard java.lang.Class objects, although easily obtainable from any object at runtime, lack all the generics information that the object could have been assigned at compile time. For example, a "List<String>" object will just be a "java.util.List" object at runtime, and there will be no way to bring back the generics information (the "of String" part). There is in fact no java.lang.Class object in the VM for "List<String>", just for "List".

This is quite often a problem for metadata-based systems, which javaRuntype tries to solve.

[top]


Which is the difference between using javaRuntype's Types and standard java.lang.reflect.Type objects?

Standard java.lang.reflect.Type objects can only be obtained as the result of applying reflection on methods or classes, and they will only specify the types of method results, method parameters, class definitions and other "code-wired" artifacts.

But these java.lang.reflect.Type objects cannot be obtained freely for its use (you cannot say to the VM: "I want the java.lang.reflect.Type object representing List<String>"), and they do not offer a truly useful operations API. They are more a type system documentation artifact, while javaRuntype's types are easy-to-use, useful type system tools.

[top]


Will javaRuntype be rendererd useless by Java 7?

Understanding that the features that will come with Java 7 are still mere rumours and leaks, there is no reason to think such thing:

  • First, it seems that the only new feature in Java 7 directly regarding the type system will be JSR 308 (annotations on types), and while this is something that (obviously) javaRuntype doesn't allow (yet), it will probably be possible to add it in a future (if needed).
  • It seems that reification of generics will not be included in Java 7. And even if it were, it would depend on the specific implementation that would be included in the API whether this would render javaRuntype redundant or not. Most suggested implementations of this (including the one accepted as RFE at BUG5098163) were defined as adding generics information to objects instantiated from generic classes, but not to define "types". This is, it would allow you to define that an object is a "List<String>" object, but apparently not to obtain a "List<? extends Serializable>" type object, which looks quite reasonable as this responsibility would be already covered by the java.lang.reflect.Type hierarchy...
  • And last... javaRuntype works with Java 1.5 or later. Java 7 will only work with... Java 7 ;-)

[top]