ashishs Sinha

Greenhorn
+ Follow
since Jul 01, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by ashishs Sinha

I guess you would be looking for two separate functionalities
1 - To generate class dynamically . You can generate java class dynamically using com.sun.codemodel pacakage.
This package provides lots of functionality to generate class programmatically - including adding method, extending/implementing other class and interface.

2 - To compile and generate class file or fetch error in runtime.
For this, you can use sun package - com.sun.tools.javac.Main to compile and to parse result or compiler error there are utility classes provided by apache in the package - org.apache.commons.jci.compilers and org.apache.commons.jci.problems

We are generating, compiling lot of classes dynamically based on user input. Later we are invoking the classes and storing the execution result in our database.
14 years ago
Oops!! I meant static "abstract" method inside an abstract class
15 years ago
Putting it in different words -
Even an abstract class cannot have a method which is static.
All these variations leads to the same question - "where can we define the implementation of the method".
Since static are tied with class/interface - if we cant implement the method in the class - we cant do so anywhere else - thats why compiler doesnt let us do so.
15 years ago