Member.java
package algorithmen.umleditor;
/**
* Generic Part of a Class.
* Base class of Field and Method.
*/
abstract public class Member extends UmlElement {
protected String type;
protected Visibility visibility;
protected boolean staticFlag;
/**
* Creates a new instance with given name and type,
* default visibility, not static.
*/
public Member(String name, String type) {
super(name);
this.type = type;
staticFlag = false;
visibility = Visibility.DEFAULT;
}
/**
* Gets the type of the Field.
*/
public String getType() {
return type;
}
/**
* Sets the type of the Field.
*/
public void setType(String newType) {
type = newType;
}
/**
* Gets the static flag of the Field.
*/
public boolean isStatic() {
return staticFlag;
}
/**
* Sets the static flag of the Field.
*/
public void setStatic(boolean flag) {
staticFlag = flag;
}
/**
* Gets the visibility of the Field.
*/
public Visibility getVisibility() {
return visibility;
}
/**
* Sets the visibility of the Field.
*/
public void setVisibility(Visibility v) {
visibility = v;
}
}