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

Class SpringBean

A <bean> element in a Spring XML file.

Import path

import semmle.code.java.frameworks.spring.SpringBean

Direct supertypes

Indirect supertypes

Known direct subtypes

Predicates

getAConstructorArg

Gets a <constructor-arg> element that applies to this bean (including those inherited from the parent bean).

getADeclaredConstructorArg

Gets a <constructor-arg> element declared in this bean.

getADeclaredLookupMethod

Gets a <lookup-method> element declared in this bean.

getADeclaredProperty

Gets a <property> element declared in this bean (not inherited from parent beans).

getADeclaredReplacedMethod

Gets a <replaced-method> element declared in this bean.

getALookupMethod

Gets a <lookup-method> element that applies to this bean (including those inherited from the parent bean).

getAProperty

Any <property> elements that apply to this bean (including those inherited from the parent bean).

getAReplacedMethod

Gets a <replaced-method> element that applies to this bean (including those inherited from the parent bean).

getAnInheritedConstructorArg

Gets a <constructor-arg> element inherited from the parent bean.

getAnInheritedLookupMethod

Gets a <lookup-method> element inherited from the parent bean.

getAnInheritedProperty

Any <property> elements inherited from parent beans.

getAnInheritedReplacedMethod

Gets a <replaced-method> element inherited from the parent bean.

getAutowire

Gets the autowire value for the bean, taking any default values from the enclosing <beans> element.

getAutowireCandidate

Gets the value for the autowire-candidate attribute.

getAutowireRaw

Gets the raw value of the autowire attribute.

getBeanId

Gets the value of the id attribute.

getBeanIdentifier

Gets the bean id or name, whichever is present, giving priority to id.

getBeanName

Gets the value of the name attribute.

getBeanParent

Gets the SpringBean parent of this bean.

getBeanParentName

Gets the name of the bean’s parent bean.

getClass

Gets the Java class referred to by the bean’s class name.

getClassName

Gets the name of the bean’s class, taking parent inheritance into account.

getClassNameRaw

Gets the value of the bean’s class attribute, if any.

getDependencyCheck

Gets the dependency-check value for the bean, taking any default values declared in the enclosing <beans> element.

getDependencyCheckRaw

Gets the value of the dependency-check attribute, if any.

getDependsOnString

Gets the value of the depends-on attribute.

getDestroyMethod

Gets the Java method that corresponds to the bean’s destroy-method.

getDestroyMethodName

Gets the destroy-method name of the bean, taking bean inheritance and <beans> defaults into account.

getDestroyMethodNameRaw

Gets the value of the bean’s destroy-method attribute.

getFactoryBean

Gets the SpringBean specified by reference as the factory bean.

getFactoryBeanName

Gets the name of the bean’s factory-bean, taking bean inheritance into account.

getFactoryBeanNameRaw

Gets the value of the factory-bean attribute.

getFactoryMethod

Gets the factory method that the Java method corresponds to.

getFactoryMethodName

Gets the name of the bean’s factory-method, taking bean inheritance into account.

getFactoryMethodNameRaw

Gets the value of the factory-method attribute.

getInitMethod

Gets the Java method that the init-method corresponds to.

getInitMethodName

Gets the init-method name of the bean, taking bean inheritance and <beans> defaults into account.

getInitMethodNameRaw

Gets the value of the bean’s init-method attribute.

getLazyInitRaw

Gets the value of the bean’s lazy-init attribute.

getQualifier

Gets the qualifier for this bean.

getQualifierValue

Gets the qualifier value for this SpringBean, defaulting to the bean identifier if no qualifier is specified.

getScope

Gets the scope of the bean.

hasBeanAncestor
hasBeanId

Holds if this element has an id attribute.

hasBeanIdentifier

Holds if the bean has a name, id or class attribute.

hasBeanName

Holds if the bean has a name attribute.

hasBeanParent

Holds if this bean has a parent bean.

hasBeanParentName

Holds if the bean has a parent attribute.

hasClassName

Holds if the bean has a class name, taking parent inheritance into account.

hasClassNameRaw

Holds if the bean has a class attribute.

hasDestroyMethodName

Holds if the bean has a destroy-method name, taking bean inheritance and <beans> defaults into account.

hasDestroyMethodNameRaw

Holds if the bean has a destroy-method attribute.

hasFactoryBeanNameRaw

Holds if the bean has a factory-bean attribute.

hasFactoryMethodNameRaw

Holds if the bean as a factory-method attribute.

hasInitMethodName

Holds if the bean has an init-method name, taking bean inheritance and <beans> defaults into account.

hasInitMethodNameRaw

Holds if the bean has an init-method attribute.

isAbstract

Holds if the bean is abstract.

isLazyInit

Holds if the bean is to be lazily initialized. Takes <beans> defaults into account.

isPrimary

Holds if the bean has been declared to be a primary bean for autowiring.

isSimilar

Holds if this bean element has the same bean identifier as other.

isTopLevel

Holds if this element is a top-level bean definition.

toString

Gets a printable representation of this XML element.

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
getASpringChild

Gets a child of this Spring XML element.

from SpringXmlElement
getAnAttribute

Gets an XML attribute of this XML element.

from XmlElement
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
getAttributeValueWithDefault

Gets the value of the attribute with name attributeName, or “default” if the attribute is not present.

from SpringXmlElement
getChild

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

from XmlParent
getContentStringfrom SpringXmlElement
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
getEnclosingBean

Gets the closest enclosing <bean> element.

from SpringXmlElement
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
getSpringBeanFile

Gets the bean file of this XML element.

from SpringXmlElement
getTextValue

Gets the text value contained in this XML parent.

from XmlParent
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

Charpred