![JAR search and dependency download from the Maven repository](/logo.png)
be.selckin.ws.util.java2php.php.PhpProperty Maven / Gradle / Ivy
package be.selckin.ws.util.java2php.php;
import org.apache.cxf.common.util.StringUtils;
import java.util.List;
public class PhpProperty {
private final String name;
private final TypeHint typeHint;
private final String initialValue;
private final List comments;
private final boolean required;
private final String explicitNamespace;
public PhpProperty(String name, TypeHint typeHint, String initialValue, List comments, boolean required) {
this(name, typeHint, initialValue, comments, required, null);
}
public PhpProperty(String name, TypeHint typeHint, String initialValue, List comments, boolean required, String explicitNamespace) {
this.name = name;
this.typeHint = typeHint;
this.initialValue = initialValue;
this.comments = comments;
this.required = required;
this.explicitNamespace = explicitNamespace;
}
public String getName() {
return name;
}
public TypeHint getTypeHint() {
return typeHint;
}
public List getComments() {
return comments;
}
public boolean isRequired() {
return required;
}
public String getInitialValue() {
return initialValue;
}
public String getExplicitNamespace() {
return explicitNamespace;
}
public String getGetterName() {
return "get" + getAccessorSuffix();
}
public String getSetterName() {
return "set" + getAccessorSuffix();
}
private String getAccessorSuffix() {
return StringUtils.capitalize(name);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy