public class StrutsInspector extends BaseXmlInspector
mLog
Constructor and Description |
---|
StrutsInspector(StrutsInspectorConfig config) |
Modifier and Type | Method and Description |
---|---|
protected Element |
getDocumentElement(ResourceResolver resolver,
InputStream... files)
Parse the given InputStreams into a single DOM Document, and return its root.
|
protected String |
getTopLevelTypeAttribute()
Overridden to search by
name= , not type= . |
protected Map<String,String> |
inspectProperty(Element toInspect)
Inspect the given Element and return a Map of attributes if it is a property.
|
getDocumentElement, getExtendsAttribute, getNameAttribute, getReferenceAttribute, getTypeAttribute, inspect, inspectAction, inspectAsDom, inspectTrait, inspectTraits, inspectTraitSiblings, preprocessDocument, traverse, traverseFromTopLevelTypeToNamedChildren
public StrutsInspector(StrutsInspectorConfig config)
protected Element getDocumentElement(ResourceResolver resolver, InputStream... files) throws Exception
BaseXmlInspector
getDocumentElement
in class BaseXmlInspector
resolver
- helper in case getDocumentElement
needs to resolve references defined
in the InputStream
.Exception
protected Map<String,String> inspectProperty(Element toInspect)
BaseXmlInspector
It is this method's responsibility to decide whether the given Element does, in fact, qualify as a 'property' - based on its own rules. Does nothing by default.
inspectProperty
in class BaseXmlInspector
toInspect
- DOM element to inspectprotected String getTopLevelTypeAttribute()
name=
, not type=
.
This is because struts-config.xml
requires form-beans/name
be
unique, whereas form-beans/type
can be, say, DynaActionForm
.
getTopLevelTypeAttribute
in class BaseXmlInspector
Copyright © 2015. All Rights Reserved.