com.github.anhem.testpopulator.internal.object.ObjectResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of test-populator Show documentation
Show all versions of test-populator Show documentation
Populate java classes with fixed or random data using reflection. Facilitates the creation of objects in tests.
The newest version!
package com.github.anhem.testpopulator.internal.object;
import java.util.List;
import java.util.Set;
import static java.util.Collections.emptyList;
import static java.util.Collections.emptySet;
public class ObjectResult {
public static final ObjectResult EMPTY_OBJECT_RESULT = new ObjectResult(null, null, emptySet(), emptySet(), emptyList());
private final String packageName;
private final String className;
private final Set imports;
private final Set staticImports;
private final List objects;
public ObjectResult(String packageName, String className, Set imports, Set staticImports, List objects) {
this.packageName = packageName;
this.className = className;
this.imports = imports;
this.staticImports = staticImports;
this.objects = objects;
}
public String getPackageName() {
return packageName;
}
public String getClassName() {
return className;
}
public Set getImports() {
return imports;
}
public Set getStaticImports() {
return staticImports;
}
public List getObjects() {
return objects;
}
public boolean isValid() {
return packageName != null && className != null && !objects.isEmpty();
}
}