package bluej.views;
import threadchecker.OnThread;
import threadchecker.Tag;
import java.lang.reflect.Modifier;
| A representation of a Java class member in BlueJ.
|
| @author Michael Cahill
|
public abstract class MemberView
{
private final View view;
private Comment comment;
protected MemberView(View view)
{
if (view == null)
throw new NullPointerException();
this.view = view;
}
| @return the View of the class or interface that declares this member.
|
public View getDeclaringView()
{
return view;
}
| @return the name of the class or interface that declares this member.
|
public String getClassName()
{
return view.getQualifiedName();
}
| Returns the Java language modifiers for the member or
| constructor represented by this Member, as an integer. The
| Modifier class should be used to decode the modifiers in
| the integer.
| @see Modifier
|
@OnThread(Tag.Any)
public abstract int getModifiers();
| Returns a string describing this member in a human-readable format
|
public abstract String getSignature();
| Sets the (javadoc) comment for this Member
|
p.public void setComment(Comment comment)
{
this.comment = comment;
}
| Returns the (javadoc) comment for this Member
|
public Comment getComment()
{
if (view != null) {
view.loadComments();
}
return comment;
}
| Get a short String describing this member
|
public abstract String getShortDesc();
| Get a longer String describing this member
|
public abstract String getLongDesc();
| @return a boolean indicating whether this member is static
|
public boolean isStatic()
{
return Modifier.isStatic(getModifiers());
}
public String toString()
{
return view.toString();
}
}
top,
use,
map,
abstract class MemberView
. MemberView
. getDeclaringView
. getClassName
. getModifiers
. getSignature
. setComment
. getComment
. getShortDesc
. getLongDesc
. isStatic
. toString
87 neLoCode
+ 15 LoComm