Class CodeNodeUtil
java.lang.Object
com.pnfsoftware.jeb.core.output.tree.CodeNodeUtil
Convenience methods to filter
ICodeNode
s.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The code item is artificialstatic final int
The code item implementsICodeClass
static final int
The code item implementsICodeField
static final int
The code item is internalstatic final int
The code item implementsICodeMethod
static final int
The code item implementsICodePackage
static final int
The code item implementsICodeType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
getChildren
(ICodeNode node, int included, int excluded) Get the children nodes that meet the provided criteria.static String
Get full package name from hierarchy, e.g.static boolean
hasChildren
(ICodeNode node, int included, int excluded) static boolean
meetsConditions
(ICodeNode node, int included, int excluded) Verify if this node meets the provided criteria.static boolean
-
Field Details
-
IS_ARTIFICIAL
public static final int IS_ARTIFICIALThe code item is artificial- See Also:
-
IS_INTERNAL
public static final int IS_INTERNALThe code item is internal- See Also:
-
IS_PACKAGE
public static final int IS_PACKAGEThe code item implementsICodePackage
- See Also:
-
IS_TYPE
public static final int IS_TYPEThe code item implementsICodeType
- See Also:
-
IS_CLASS
public static final int IS_CLASSThe code item implementsICodeClass
- See Also:
-
IS_FIELD
public static final int IS_FIELDThe code item implementsICodeField
- See Also:
-
IS_METHOD
public static final int IS_METHODThe code item implementsICodeMethod
- See Also:
-
-
Constructor Details
-
CodeNodeUtil
public CodeNodeUtil()
-
-
Method Details
-
meetsConditions
Verify if this node meets the provided criteria. Refer to theIS_xxx
possible flags returned by#getItemFlags()
.- Parameters:
node
- node to be testedincluded
- these flags MUST be setexcluded
- these flags MUST NOT be set- Returns:
- true iff the node meets the required conditions
-
mustBe
-
cannotBe
-
getChildren
Get the children nodes that meet the provided criteria. Refer to theIS_xxx
possible flags returned by#getItemFlags()
.- Parameters:
node
- parent code nodeincluded
- if non-0, candidates children MUST have the flags setexcluded
- if non-0, candidates children MUST NOT have the flags set- Returns:
- the list of children
-
hasChildren
-
getPackageNameFromHierarchy
Get full package name from hierarchy, e.g. package 'bar' located in packages std->foo is named 'std::foo::bar'.- Returns:
- full package name using C++ separator, null if node is not a package
-