public class NormalClassDeclaration extends AbstractTypeDeclarationNode
NormalClassDeclaration:
'class' Identifier [TypeParameters] ['extends' Type] ['implements' TypeList] ClassBody
| Constructor and Description |
|---|
NormalClassDeclaration(Scanner s,
int offs,
java.lang.String className) |
| Modifier and Type | Method and Description |
|---|---|
void |
addImplemented(Type implemented)
Adds an implemented type to this class declaration.
|
Type |
getExtendedType() |
int |
getImplementedCount() |
java.util.Iterator<Type> |
getImplementedIterator() |
Method |
getMethodContainingOffset(int offs)
Gets the method in this class that contains a given offset.
|
java.lang.String |
getName()
Returns the "name" of this node.
|
int |
getNameEndOffset()
Returns the end offset of the "name" of this node.
|
int |
getNameStartOffset()
Returns the start offset of the "name" of this node.
|
java.util.List<TypeParameter> |
getTypeParameters() |
java.lang.String |
getTypeString()
Returns the type of this type declaration, as a string.
|
void |
setDeclarationEndOffset(Offset end) |
protected void |
setDeclarationOffsets(Offset start,
Offset end)
Sets the start and end offsets of this node.
|
void |
setExtendedType(Type type) |
void |
setTypeParameters(java.util.List<TypeParameter> typeParams) |
addMember, addTypeDeclaration, getBodyContainsOffset, getBodyEndOffset, getBodyStartOffset, getChildType, getChildTypeAtOffset, getChildTypeCount, getDocComment, getFieldIterator, getMember, getMemberCount, getMemberIterator, getMethodIterator, getMethodsByName, getModifiers, getName, getPackage, getParentType, isDeprecated, isStatic, setBodyEndOffset, setBodyStartOffset, setDeprecated, setDocComment, setModifiers, setPackage, setParentType, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetNamegetNameEndOffset, getNameStartOffsetpublic NormalClassDeclaration(Scanner s, int offs, java.lang.String className)
public void addImplemented(Type implemented)
implemented - The implemented type.public Type getExtendedType()
public int getImplementedCount()
public java.util.Iterator<Type> getImplementedIterator()
public Method getMethodContainingOffset(int offs)
offs - The offset.null if no
method in this class contains the offset.public java.util.List<TypeParameter> getTypeParameters()
public java.lang.String getTypeString()
TypeDeclarationpublic void setExtendedType(Type type)
public void setTypeParameters(java.util.List<TypeParameter> typeParams)
public java.lang.String getName()
CodeBlocks
it will be CodeBlock.NAME.Note that this may not be unique. For example, a class with an overloaded method will have multiple methods with the same "name," just with different signatures.
public int getNameEndOffset()
getNameEndOffset in interface ASTNodepublic int getNameStartOffset()
getNameStartOffset in interface ASTNodepublic void setDeclarationEndOffset(Offset end)