Class CodeNodeUtil
java.lang.Object
com.pnfsoftware.jeb.core.output.tree.CodeNodeUtil
Convenience methods to filter
ICodeNodes.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe code item is artificialstatic final intThe code item implementsICodeClassstatic final intThe code item implementsICodeFieldstatic final intThe code item is internalstatic final intThe code item implementsICodeMethodstatic final intThe code item implementsICodePackagestatic final intThe code item implementsICodeType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleangetChildren(ICodeNode node, int included, int excluded) Get the children nodes that meet the provided criteria.static StringGet full package name from hierarchy, e.g.static booleanhasChildren(ICodeNode node, int included, int excluded) static booleanmeetsConditions(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_xxxpossible 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_xxxpossible 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
-