org.dummycreator.ClassUsageInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dummy-creator Show documentation
Show all versions of dummy-creator Show documentation
A small tool for generating populated dummy objects
package org.dummycreator;
/**
* Stores an Java object instance and keeps track of whether the instance has been populated with dummy values.
*
* Used by the {@link DummyCreator} to avoid a recursive loop when populating an object that has a field of its own type (or contains a
* chain that returns to its own type).
*
* @param The type of the instance stored.
*/
class ClassUsageInfo {
private T instance = null;
private boolean populated = false;
public T getInstance() {
return instance;
}
public void setInstance(T instance) {
this.instance = instance;
}
public boolean isPopulated() {
return populated;
}
public void setPopulated(boolean populated) {
this.populated = populated;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy