Class EntityStack
java.lang.Object
fr.inria.verveine.extractor.java.utils.EntityStack
A stack of FAMIX Entities so that we know in what container each new Entity is declared
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTopMethodCyclo(int c) Adds to the Cyclomatic complexity of the Famix Method on top of the context stackvoidaddTopMethodNOS(int n) Adds to the Number of Statements of the Famix Method on top of the context stackvoidEmpties the context stack of package and associated classesvoidEmpties the context stack of Famix classesintReturns the Cyclomatic complexity of the Famix Method on top of the context stackintReturns the Number of Statements of the Famix Method on top of the context stackpop()Pops the top Famix method of the current class on top of the "context stack" Note: does not check that there is such a class or method, so could possibly throw an ExceptionpopPckg()Removes and returns the Famix package from the "context stack" Also empties the class stack (which was presumably associated to this package) Note: does not check that there is such a namespacepopType()Pops the top Famix type from the "context stack"
Note: does not check that there is such a type, so could possibly throw an EmptyStackExceptionvoidpush(TNamedEntity e) Pushes an entity on top of the "context stack"voidvoidPushes a Famix BehaviouralEntity on top of the "context stack" Adds also a special entity to hold the metrics for the BehaviouralEntityvoidPushes a Famix method on top of the "context stack" for the current Famix Type Adds also a special entity to hold the metrics for the methodvoidSets the Famix Package on top of the "context stack"voidPushes a Famix Type on top of the "context type stack"voidsetLastAccess(TAccess lastAccess) voidsetLastInvocation(TInvocation invok) voidsetLastReference(TReference lastReference) voidsetTopMethodCyclo(int c) Sets the Cyclomatic complexity of the Famix Method on top of the context stackvoidsetTopMethodNOS(int n) Sets to the Number of Statements of the Famix Method on top of the context stacktop()Returns the Famix entity on top of the "context stack" Note: does not check that there is such an entityReturns the Famix BehaviouralEntity on top of the "context stack" Note: does not check that there is such a BehaviouralEntity, so could possibly throw an EmptyStackExceptionReturns the Famix method of the Famix class on top of the "context stack" Note: does not check that there is such a class or method, so could possibly throw an EmptyStackExceptiontopPckg()Returns the Famix package on top of the "context stack" Note: does not check that there is such a packagetopType()Returns the Famix type on top of the "context stack" Note: does not check that there is such a class, so could possibly throw an EmptyStackException
-
Field Details
-
EMPTY_CYCLO
public static final int EMPTY_CYCLO- See Also:
-
EMPTY_NOS
public static final int EMPTY_NOS- See Also:
-
-
Constructor Details
-
EntityStack
public EntityStack()
-
-
Method Details
-
clearTypes
public void clearTypes()Empties the context stack of Famix classes -
getLastAccess
-
setLastAccess
-
getLastReference
-
setLastReference
-
getLastInvocation
-
setLastInvocation
-
push
Pushes an entity on top of the "context stack"- Parameters:
e- -- the entity
-
pushPckg
Sets the Famix Package on top of the "context stack"- Parameters:
e- -- the Famix Package
-
pushType
Pushes a Famix Type on top of the "context type stack"- Parameters:
t- -- the FamixType
-
pushMethod
Pushes a Famix method on top of the "context stack" for the current Famix Type Adds also a special entity to hold the metrics for the method- Parameters:
e- -- the Famix method
-
pushBehaviouralEntity
Pushes a Famix BehaviouralEntity on top of the "context stack" Adds also a special entity to hold the metrics for the BehaviouralEntity- Parameters:
e- -- the Famix BehaviouralEntity
-
pushAnnotationMember
-
clearPckg
public void clearPckg()Empties the context stack of package and associated classes -
pop
-
popPckg
Removes and returns the Famix package from the "context stack" Also empties the class stack (which was presumably associated to this package) Note: does not check that there is such a namespace- Returns:
- the Famix method
-
popType
Pops the top Famix type from the "context stack"
Note: does not check that there is such a type, so could possibly throw an EmptyStackException- Returns:
- the Famix class
-
popMethod
Pops the top Famix method of the current class on top of the "context stack" Note: does not check that there is such a class or method, so could possibly throw an Exception- Returns:
- the Famix method
-
popAnnotationMember
-
top
Returns the Famix entity on top of the "context stack" Note: does not check that there is such an entity- Returns:
- the Famix entity
-
topPckg
Returns the Famix package on top of the "context stack" Note: does not check that there is such a package- Returns:
- the Famix namespace
-
topType
Returns the Famix type on top of the "context stack" Note: does not check that there is such a class, so could possibly throw an EmptyStackException- Returns:
- the Famix class
-
topBehaviouralEntity
Returns the Famix BehaviouralEntity on top of the "context stack" Note: does not check that there is such a BehaviouralEntity, so could possibly throw an EmptyStackException- Returns:
- the Famix BehaviouralEntity
-
topMethod
Returns the Famix method of the Famix class on top of the "context stack" Note: does not check that there is such a class or method, so could possibly throw an EmptyStackException- Returns:
- the Famix method
-
topAnnotationMember
-
getTopMethodCyclo
public int getTopMethodCyclo()Returns the Cyclomatic complexity of the Famix Method on top of the context stack -
getTopMethodNOS
public int getTopMethodNOS()Returns the Number of Statements of the Famix Method on top of the context stack -
setTopMethodCyclo
public void setTopMethodCyclo(int c) Sets the Cyclomatic complexity of the Famix Method on top of the context stack -
setTopMethodNOS
public void setTopMethodNOS(int n) Sets to the Number of Statements of the Famix Method on top of the context stack -
addTopMethodCyclo
public void addTopMethodCyclo(int c) Adds to the Cyclomatic complexity of the Famix Method on top of the context stack -
addTopMethodNOS
public void addTopMethodNOS(int n) Adds to the Number of Statements of the Famix Method on top of the context stack
-