CodeQL library for Java/Kotlin
codeql/java-all 4.2.1 (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 XmlParentImpl
getACharactersSet

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

from XmlParentImpl
getAChild

Gets a child element of this XML parent.

from XmlParentImpl
getAChild

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

from XmlParentImpl
getAComment

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

from XmlParentImpl
getASpringChild

Gets a child of this Spring XML element.

from SpringXmlElement
getAnAttribute

Gets an XML attribute of this XML element.

from XmlElementImpl
getAttribute

Gets the attribute with the specified name, if any.

from XmlElementImpl
getAttributeValue

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

from XmlElementImpl
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 XmlParentImpl
getContentStringfrom SpringXmlElement
getDepth

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

from XmlElementImpl
getElementPositionIndex

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

from XmlElementImpl
getEnclosingBean

Gets the closest enclosing <bean> element.

from SpringXmlElement
getFile

Gets the XML file in which this XML element occurs.

from XmlElementImpl
getIndex

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

from XmlElementImpl
getLocation

Gets the location of this element.

from XmlLocatableImpl
getName

Gets the name of this XML element.

from XmlElementImpl
getNamespace

Gets the namespace of this XML element, if any.

from XmlElementImpl
getNumberOfCharacterSets

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

from XmlParentImpl
getNumberOfChildren

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

from XmlParentImpl
getParent

Gets the parent of this XML element.

from XmlElementImpl
getSpringBeanFile

Gets the bean file of this XML element.

from SpringXmlElement
getTextValue

Gets the text value contained in this XML parent.

from XmlParentImpl
hasAttribute

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

from XmlElementImpl
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 XmlLocatableImpl
hasName

Holds if this XML element has the given name.

from XmlElementImpl
hasNamespace

Holds if this XML element has a namespace.

from XmlElementImpl

Charpred