Java: extending Object class -


I am writing an "extension" (well, complete) of Java which will help in role programming.
I translate my code into java code with javacc, my compiler adds every declared class to some code. Here's an example to be clear:

  MyClass String tool ObjectWithRoles {// implements ... Added / * Added by me * / public setRole (...) {...} Public ... / * End of luggage * / ... // myClass stuff}  

This implements the requirements .. and the methods required for each single class that You are very difficult to declare, isnt'it?

It would be better if I write my methods in a class and expand in all sections .. But .. if the class already extends another category (just like the example) ?

I do not want to create a type of cover, which manages the roles because I do not want the programmer to know more than Java, some new reserved words and its use.

My idea was java.lang.Object extension .. but you can not (right?)
other thoughts?

I am new here, but I follow this site, so thanks for reading and all the answers given by you! (I apologize for English, I'm Italian)

If this is the only "research" project The way in which you want to know how this type of extension will work, you can provide your own implementation of the object class just copy the existing object implementation, copy your setRole Add method, and add -xbootclasspath .: / Usr / lib / jvm / java-6-sun / jre / lib / rt.jar Foot of java command As the meter. (I will see API-classes in ./ before being viewed in the actual rt.jar .)


Comments