mercredi 19 juin 2019

Java Reflection, creating object of private class from different package

I have a private class (Deque) that I need to create an object of, from another class outside of the package (package com.example)

package com.example;

final class Deque {

    public Deque() {}

}

Using reflection, how would I go about creating an object of Type com.example.Deque, from a class that is not inside the package com.example?





Aucun commentaire:

Enregistrer un commentaire