Thanks Grau,
But what I was trying to do was to create a class dynamically ie say
Class dosntExistOnDisk=new Class();
dosntExistOnDisk.addConstructor(..);
dosntExistOnDisk.addMethod(...)
or rather I was trying to create a Type Dynamically .which I have understood that its not possible .
Yet Another Doubt has crept into my head..
I have three packages A,B,C and I have 20 classes in each of these packages. So thought of writing a logger.(<JDK 1.4 hence) Dint want 20 instances of logger to be created in each package hence I made it a singleton( Great I used a
pattern). But the behaviour of logger would differ in each package.
In package A it will log the Message,time,X,and Y...In package it will log only message and so on.
I end up creating 3 singleton loggers for Package A,B and C. I see that my logger has 20 methods of which only one differs across A,B and C.
Now The Big Question ? How Can I Abstract the behaviour of singleton objects.IS IT possible .
DO I need to go for Aspect Oriented Programming ?
[ Dont know what that means but aspectj.org speaks a lot]
or am I really missing something inside my head
Thanks in Advance Geeks
-Mandan
[ Any One out there from Kerala,India?]