
org.unidal.eunit.model.entity.EunitParameter Maven / Gradle / Ivy
/* THIS FILE WAS AUTO GENERATED BY codegen-maven-plugin, DO NOT EDIT IT */
package org.unidal.eunit.model.entity;
import java.util.ArrayList;
import java.util.List;
import org.unidal.eunit.model.BaseEntity;
import org.unidal.eunit.model.IVisitor;
public class EunitParameter extends BaseEntity {
private Class> m_type;
private String m_id;
private transient Integer m_index;
private transient EunitMethod m_eunitMethod;
private transient List m_annotations = new ArrayList();
public EunitParameter() {
}
@Override
public void accept(IVisitor visitor) {
visitor.visitEunitParameter(this);
}
public EunitParameter addAnnotation(java.lang.annotation.Annotation annotation) {
m_annotations.add(annotation);
return this;
}
@Override
public boolean equals(Object obj) {
if (obj instanceof EunitParameter) {
EunitParameter _o = (EunitParameter) obj;
if (!equals(getType(), _o.getType())) {
return false;
}
if (!equals(getId(), _o.getId())) {
return false;
}
return true;
}
return false;
}
@SuppressWarnings("unchecked")
public T findAnnotation(Class clazz) {
for (java.lang.annotation.Annotation annotation : m_annotations) {
if (annotation.annotationType() == clazz) {
return (T) annotation;
}
}
return null;
}
public List getAnnotations() {
return m_annotations;
}
public EunitMethod getEunitMethod() {
return m_eunitMethod;
}
public String getId() {
return m_id;
}
public Integer getIndex() {
return m_index;
}
public Class> getType() {
return m_type;
}
@Override
public int hashCode() {
int hash = 0;
hash = hash * 31 + (m_type == null ? 0 : m_type.hashCode());
hash = hash * 31 + (m_id == null ? 0 : m_id.hashCode());
return hash;
}
public boolean isAnnotationPresent(Class extends java.lang.annotation.Annotation> clazz) {
return findAnnotation(clazz) != null;
}
@Override
public void mergeAttributes(EunitParameter other) {
if (other.getType() != null) {
m_type = other.getType();
}
if (other.getId() != null) {
m_id = other.getId();
}
if (other.getIndex() != null) {
m_index = other.getIndex();
}
if (other.getEunitMethod() != null) {
m_eunitMethod = other.getEunitMethod();
}
}
public EunitParameter setEunitMethod(EunitMethod eunitMethod) {
m_eunitMethod = eunitMethod;
return this;
}
public EunitParameter setId(String id) {
m_id = id;
return this;
}
public EunitParameter setIndex(Integer index) {
m_index = index;
return this;
}
public EunitParameter setType(Class> type) {
m_type = type;
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy