All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jvnet.jaxb2_commons.xml.bind.model.concrete.CMPropertyInfo Maven / Gradle / Ivy

The newest version!
package org.jvnet.jaxb2_commons.xml.bind.model.concrete;

import org.jvnet.jaxb2_commons.lang.Validate;
import org.jvnet.jaxb2_commons.xml.bind.model.MClassInfo;
import org.jvnet.jaxb2_commons.xml.bind.model.MCustomizable;
import org.jvnet.jaxb2_commons.xml.bind.model.MCustomizations;
import org.jvnet.jaxb2_commons.xml.bind.model.MPropertyInfo;
import org.jvnet.jaxb2_commons.xml.bind.model.origin.MPropertyInfoOrigin;

public abstract class CMPropertyInfo implements
		MPropertyInfo, MCustomizable {

	private CMCustomizations customizations = new CMCustomizations();
	private MPropertyInfoOrigin origin;
	private MClassInfo classInfo;

	private final String privateName;

	private final boolean collection;

	private final boolean required;

	public CMPropertyInfo(MPropertyInfoOrigin origin,
			MClassInfo classInfo, String privateName, boolean collection,
			boolean required) {
		Validate.notNull(origin);
		Validate.notNull(classInfo);
		Validate.notNull(privateName);
		this.origin = origin;
		this.classInfo = classInfo;
		this.privateName = privateName;
		this.collection = collection;
		this.required = required;
	}

	public MCustomizations getCustomizations() {
		return customizations;
	}

	public MPropertyInfoOrigin getOrigin() {
		return origin;
	}

	public MClassInfo getClassInfo() {
		return classInfo;
	}

	public String getPrivateName() {
		return privateName;
	}

	public String getPublicName() {
		// TODO
		return this.getPrivateName();
	}

	public boolean isCollection() {
		return collection;
	}

	public boolean isRequired() {
		return required;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy