Skip to content

Allows to create objects without invoking constructor

Notifications You must be signed in to change notification settings

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

No packages published

Languages