public class InterfaceDeclaration extends TypeDeclaration
Modifier and Type | Field and Description |
---|---|
protected Extends |
extending |
fullName, isLibrary, members, name, parentIsInterfaceDeclaration
modArray
Constructor and Description |
---|
InterfaceDeclaration() |
InterfaceDeclaration(ExtList children,
ProgramElementName fullName,
boolean isLibrary)
uses children list to create non-anonymous class
|
InterfaceDeclaration(Modifier[] modifiers,
ProgramElementName name,
Extends extended,
MemberDeclaration[] members,
boolean isLibrary)
Construct a new outer or member interface class.
|
InterfaceDeclaration(Modifier[] modifiers,
ProgramElementName name,
ProgramElementName fullName,
Extends extended,
MemberDeclaration[] members,
boolean isLibrary)
Construct a new outer or member interface class.
|
InterfaceDeclaration(ProgramElementName name) |
Modifier and Type | Method and Description |
---|---|
ProgramElement |
getChildAt(int index)
Returns the child at the specified index in this node's "virtual"
child array
|
int |
getChildCount()
Returns the number of children of this node.
|
Extends |
getExtendedTypes()
Get extended types.
|
ImmutableList<KeYJavaType> |
getSupertypes()
returns the local declared supertypes
|
boolean |
isAbstract()
Interfaces are always abstract.
|
boolean |
isInterface()
Checks if this class type denotes an interface.
|
boolean |
isNative()
Interfaces are never native.
|
boolean |
isPrivate()
Interfaces are never private.
|
boolean |
isProtected()
Interfaces are never protected.
|
boolean |
isStrictFp()
Interfaces are never strictfp.
|
boolean |
isSynchronized()
Interfaces are never synchronized.
|
boolean |
isTransient()
Interfaces are never transient.
|
boolean |
isVolatile()
Interfaces are never volatile.
|
void |
prettyPrint(PrettyPrinter p)
Pretty printing the source element.
|
void |
visit(Visitor v)
calls the corresponding method of a visitor in order to
perform some action/transformation on this element
|
equals, getAllFields, getAllMethods, getAllSupertypes, getAllTypes, getConstructors, getDefaultValue, getFields, getFirstElement, getFullName, getLastElement, getMembers, getMethods, getName, getPackage, getProgramElementName, getTypeDeclarationAt, getTypeDeclarationCount, getTypes, isFinal, isLibraryClass, isPublic, isStatic
getModifiers, getStateCount, getVisibilityModifier, isGhost, isModel
compatibleBlockSize, computeHashCode, equalsModRenaming, getArrayPos, match, matchChildren
getComments, hashCode, prettyPrintMain, reuseSignature
getEndPosition, getFirstElementIncludingBlocks, getParentClass, getPositionInfo, getRelativePosition, getStartPosition, setParentClass, toSource, toString, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getModifiers
getComments, match
equalsModRenaming, getEndPosition, getFirstElementIncludingBlocks, getPositionInfo, getRelativePosition, getStartPosition
protected final Extends extending
public InterfaceDeclaration()
public InterfaceDeclaration(Modifier[] modifiers, ProgramElementName name, ProgramElementName fullName, Extends extended, MemberDeclaration[] members, boolean isLibrary)
public InterfaceDeclaration(Modifier[] modifiers, ProgramElementName name, Extends extended, MemberDeclaration[] members, boolean isLibrary)
public InterfaceDeclaration(ExtList children, ProgramElementName fullName, boolean isLibrary)
children
- an ExtList that may contain: an Extends
(as pointer to a class), ProgramElementName (as name),
several MemberDeclaration (as members of
the type), a parentIsInterfaceDeclaration (indicating if parent is
interface), several Modifier (as modifiers of the type decl), a CommentfullName
- the fully qualified ProgramElementName of the declared
typeisLibrary
- a boolean flag indicating if this interface is part of
a library (library interfaces come often with a specification and are
only available as bytecode)public InterfaceDeclaration(ProgramElementName name)
public int getChildCount()
public ProgramElement getChildAt(int index)
index
- an index into this node's "virtual" child arrayjava.lang.ArrayIndexOutOfBoundsException
- if index is out
of boundspublic Extends getExtendedTypes()
public boolean isAbstract()
isAbstract
in interface ClassType
isAbstract
in class TypeDeclaration
true
if this member is abstract,
false
otherwise.ClassType.isInterface()
public boolean isNative()
isNative
in class JavaDeclaration
public boolean isProtected()
isProtected
in interface Member
isProtected
in interface MemberDeclaration
isProtected
in class TypeDeclaration
true
if this member is protected,
false
otherwise.public boolean isPrivate()
isPrivate
in interface Member
isPrivate
in interface MemberDeclaration
isPrivate
in class TypeDeclaration
true
if this member is private,
false
otherwise.public boolean isStrictFp()
isStrictFp
in interface Member
isStrictFp
in interface MemberDeclaration
isStrictFp
in class TypeDeclaration
true
if this member is strictfp,
false
otherwise.public boolean isSynchronized()
isSynchronized
in class JavaDeclaration
public boolean isTransient()
isTransient
in class JavaDeclaration
public boolean isVolatile()
isVolatile
in class JavaDeclaration
public boolean isInterface()
ClassType
true
if this object represents an interface,
false
if it is an ordinary class.public ImmutableList<KeYJavaType> getSupertypes()
getSupertypes
in interface ClassType
getSupertypes
in class TypeDeclaration
public void visit(Visitor v)
v
- the Visitorpublic void prettyPrint(PrettyPrinter p) throws java.io.IOException
JavaSourceElement
prettyPrint
in interface SourceElement
prettyPrint
in class JavaProgramElement
p
- a pretty printer.java.io.IOException
- occasionally thrown.