org.bbottema.loremipsumobjects.ClassUsageInfo Maven / Gradle / Ivy
/*
 * Copyright (C) 2019 Benny Bottema ([email protected])
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.bbottema.loremipsumobjects;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import lombok.Data;
import org.jetbrains.annotations.Nullable;
/**
 * Stores a object and keeps track of whether the instance has been populated with dummy values.
 * 
 * Used by {@link LoremIpsumObjectCreator} 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.
 */
@Data
@SuppressFBWarnings(justification = "Generated code")
public class ClassUsageInfo {
	@Nullable
	private T instance = null;
	private boolean populated = false;
}  
    © 2015 - 2025 Weber Informatics LLC | Privacy Policy