Class ConstructIdUtil
- java.lang.Object
-
- org.eclipse.steady.java.monitor.touch.ConstructIdUtil
-
public class ConstructIdUtil extends Object
ConstructIdUtil class.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ConstructIdgetConstructidFromQName(String _qname, String type)Given a qualified name return the ConstructId that represent it.static ConstructIdUtilgetInstance()Getter for the fieldinstance.booleanisAppConstruct(ConstructId _jid)Checks whether the givenConstructIdis part of the application under analysis.booleanisLibConstruct(ConstructId _jid)Returns true if the givenConstructIdis neither part of the application nor a test method, false otherwise.static booleanisOfInstrumentableType(ConstructId _jid)Returns true if the givenJavaIdis an instance ofJavaClassInit,JavaMethodIdorJavaConstructorId, false otherwise.
-
-
-
Method Detail
-
getInstance
public static ConstructIdUtil getInstance()
Getter for the field
instance.- Returns:
- a
ConstructIdUtilobject.
-
isAppConstruct
public boolean isAppConstruct(ConstructId _jid)
Checks whether the givenConstructIdis part of the application under analysis. The check is implemented by looing at the definition context, which should be either class or enum. The reason is that, e.g., static initializers are not considered at the time of the source code analysis, hence, are not part of the collection.- Parameters:
_jid- aConstructIdobject.- Returns:
- a boolean.
-
isLibConstruct
public boolean isLibConstruct(ConstructId _jid)
Returns true if the givenConstructIdis neither part of the application nor a test method, false otherwise.- Parameters:
_jid- aConstructIdobject.- Returns:
- a boolean.
-
isOfInstrumentableType
public static boolean isOfInstrumentableType(ConstructId _jid)
Returns true if the givenJavaIdis an instance ofJavaClassInit,JavaMethodIdorJavaConstructorId, false otherwise.- Parameters:
_jid- aConstructIdobject.- Returns:
- a boolean.
-
getConstructidFromQName
public ConstructId getConstructidFromQName(String _qname, String type)
Given a qualified name return the ConstructId that represent it. For now is implemented only on constructors and method (also including <clinit> and <init>). If the type requested is null or is not in the range of teh allowed types the method return null- Parameters:
_qname- the qname of the construct.type- can be CONSTRUCTOR,CLASSINIT,METHOD,CLASS,NESTED_CLASS- Returns:
- Return the java representation of this constructid or null if is not found
-
-