Skip to content

hyndor/EmptyConstructorHack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

EmptyConstructorHack

Allows you to create objects without invoking constructor

To get some code examples check test files.

        AsmClassGenerator generator = new AsmClassGenerator(SafeClassDefiner.getInstance());
        EmptyConstructorCreator creator = generator.newClassInstanceManipulator(ClassWithConstructor.class);
        ClassWithConstructor o = (ClassWithConstructor) creator.newInstance();

And you are done.

Be aware that creating 'EmptyConstructorCreator' is a heavy operation and should be done only once per class.

About

Allows to create objects without invoking constructor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages