CodeQL library for Java/Kotlin
codeql/java-all 0.9.0 (changelog, source)
Search

Class Pom

An XML element named “project”, with convenience access methods to retrieve child XML elements named “version”, “name” and “dependencies”, typically found at the top-level of Maven POM XML files.

Access to child XML elements named “groupId” and “artifactId” is provided via inherited methods from the super-class.

Import path

import semmle.code.xml.MavenPom

Direct supertypes

Indirect supertypes

Predicates

getADependency

Gets a Dependency element for this POM.

getALocalProperty

Gets a property defined in the <properties> section of this POM.

getAProperty

Gets a property value defined for this project, either in a local <properties> section, or in the <properties> section of an ancestor POM.

getASourceRefType

Gets a RefType contained in the source directory.

getAnExportedDependency

Gets all the dependencies that are exported by this POM. An exported dependency is one that is transitively available, i.e. one with scope “compile”.

getAnExportedPom

Gets a POM dependency that is exported by this POM. An exported dependency is one that is transitively available, i.e. one with scope “compile”.

getCoordinate

Gets a Maven coordinate of the form groupId:artifactId:version.

getDependencies

Gets a child XML element named “dependencies”.

getDependencyManagement

Gets a child XML element named “dependencyManagement”.

getGroup

Gets a child XML element named “groupId”.

getNamed

Gets a child XML element named “name”.

getParentElement

Gets the <parent> element of this POM, if any.

getParentPom

Gets the POM referred to by the <parent> element of this POM, if any.

getProjectProperty

Gets a “project property” - for example, the groupId, name or packaging.

getProperty

Gets a property value defined for this project with the given name, either in a local <properties> section, or in the <properties> section of an ancestor POM.

getSourceDirectory

Gets the folder considered to be the source directory for this POM, if present in the analyzed snapshot.

getVersionStringForDependency

Gets the version specified for dependency dep in a dependencyManagement section in this POM or one of its ancestors, or an empty string if no version is specified.

resolvePlaceholder

Resolve the given placeholder (if possible) in the static context of this POM. Resolution occurs by considering the properties defined by this project or an ancestor project.

Inherited predicates

allCharactersString

Gets the result of appending all the character sequences of this XML parent from left to right, separated by a space.

from XmlParent
getACharactersSet

Gets a character sequence that is a child of this XML parent.

from XmlParent
getAChild

Gets a child element of this XML parent.

from XmlParent
getAChild

Gets a child element of this XML parent with the given name.

from XmlParent
getAComment

Gets a comment that is a child of this XML parent.

from XmlParent
getAnAttribute

Gets an XML attribute of this XML element.

from XmlElement
getArtifact

Gets a child XML element named “artifactId”.

from ProtoPom
getAttribute

Gets the attribute with the specified name, if any.

from XmlElement
getAttributeValue

Gets the value of the attribute with the specified name, if any.

from XmlElement
getChild

Gets the child element at a specified index of this XML parent.

from XmlParent
getDepth

Gets the depth of this element within the XML file tree structure.

from XmlElement
getElementPositionIndex

Gets the index of this XML element among its parent’s children.

from XmlElement
getFile

Gets the XML file in which this XML element occurs.

from XmlElement
getIndex

Gets the index of this XML element among its parent’s children.

from XmlElement
getLocation

Gets the source location for this element.

from XmlLocatable
getName

Gets the name of this XML element.

from XmlElement
getNamespace

Gets the namespace of this XML element, if any.

from XmlElement
getNumberOfCharacterSets

Gets the number of places in the body of this XML parent where text occurs.

from XmlParent
getNumberOfChildren

Gets the number of child XML elements of this XML parent.

from XmlParent
getParent

Gets the parent of this XML element.

from XmlElement
getShortCoordinate

Gets a Maven coordinate of the form groupId:artifactId.

from ProtoPom
getTextValue

Gets the text value contained in this XML parent.

from XmlParent
getVersion

Gets a child XML element named “version”.

from ProtoPom
getVersionString

Gets a string representing the version, or an empty string if no version tag was provided.

from ProtoPom
hasAttribute

Holds if this XML element has an attribute with the specified name.

from XmlElement
hasLocationInfo

Holds if this element is at the specified location. The location spans column startcolumn of line startline to column endcolumn of line endline in file filepath. For more information, see Locations.

from XmlLocatable
hasName

Holds if this XML element has the given name.

from XmlElement
hasNamespace

Holds if this XML element has a namespace.

from XmlElement
toString

Gets a printable representation of this XML element.

from XmlElement

Charpred