📄 simpleadapterdocument.java
字号:
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space
// Source File Name: SimpleAdapterDocument.java
package org.apache.struts2.views.xslt;
import java.util.Arrays;
import java.util.List;
import org.apache.struts2.StrutsException;
import org.w3c.dom.*;
// Referenced classes of package org.apache.struts2.views.xslt:
// AbstractAdapterNode, AdapterFactory, AdapterNode
public class SimpleAdapterDocument extends AbstractAdapterNode
implements Document
{
private Element rootElement;
public SimpleAdapterDocument(AdapterFactory adapterFactory, AdapterNode parent, String propertyName, Object value)
{
setContext(adapterFactory, parent, propertyName, value);
}
public void setPropertyValue(Object prop)
{
super.setPropertyValue(prop);
rootElement = null;
}
private Element getRootElement()
{
if (rootElement != null)
return rootElement;
Node node = getAdapterFactory().adaptNode(this, getPropertyName(), getPropertyValue());
if (node instanceof Element)
rootElement = (Element)node;
else
throw new StrutsException((new StringBuilder()).append("Document adapter expected to wrap an Element type. Node is not an element:").append(node).toString());
return rootElement;
}
protected List getChildAdapters()
{
return Arrays.asList(new Node[] {
getRootElement()
});
}
public NodeList getChildNodes()
{
return new NodeList() {
final SimpleAdapterDocument this$0;
public Node item(int i)
{
return getRootElement();
}
public int getLength()
{
return 1;
}
{
this$0 = SimpleAdapterDocument.this;
super();
}
};
}
public DocumentType getDoctype()
{
return null;
}
public Element getDocumentElement()
{
return getRootElement();
}
public Element getElementById(String string)
{
return null;
}
public NodeList getElementsByTagName(String string)
{
return null;
}
public NodeList getElementsByTagNameNS(String string, String string1)
{
return null;
}
public Node getFirstChild()
{
return getRootElement();
}
public DOMImplementation getImplementation()
{
return null;
}
public Node getLastChild()
{
return getRootElement();
}
public String getNodeName()
{
return "#document";
}
public short getNodeType()
{
return 9;
}
public Attr createAttribute(String string)
throws DOMException
{
return null;
}
public Attr createAttributeNS(String string, String string1)
throws DOMException
{
return null;
}
public CDATASection createCDATASection(String string)
throws DOMException
{
return null;
}
public Comment createComment(String string)
{
return null;
}
public DocumentFragment createDocumentFragment()
{
return null;
}
public Element createElement(String string)
throws DOMException
{
return null;
}
public Element createElementNS(String string, String string1)
throws DOMException
{
return null;
}
public EntityReference createEntityReference(String string)
throws DOMException
{
return null;
}
public ProcessingInstruction createProcessingInstruction(String string, String string1)
throws DOMException
{
return null;
}
public Text createTextNode(String string)
{
return null;
}
public boolean hasChildNodes()
{
return true;
}
public Node importNode(Node node, boolean b)
throws DOMException
{
return null;
}
public Node getChildAfter(Node child)
{
return null;
}
public Node getChildBefore(Node child)
{
return null;
}
public String getInputEncoding()
{
throw operationNotSupported();
}
public String getXmlEncoding()
{
throw operationNotSupported();
}
public boolean getXmlStandalone()
{
throw operationNotSupported();
}
public void setXmlStandalone(boolean b)
throws DOMException
{
throw operationNotSupported();
}
public String getXmlVersion()
{
throw operationNotSupported();
}
public void setXmlVersion(String string)
throws DOMException
{
throw operationNotSupported();
}
public boolean getStrictErrorChecking()
{
throw operationNotSupported();
}
public void setStrictErrorChecking(boolean b)
{
throw operationNotSupported();
}
public String getDocumentURI()
{
throw operationNotSupported();
}
public void setDocumentURI(String string)
{
throw operationNotSupported();
}
public Node adoptNode(Node node)
throws DOMException
{
throw operationNotSupported();
}
public DOMConfiguration getDomConfig()
{
throw operationNotSupported();
}
public void normalizeDocument()
{
throw operationNotSupported();
}
public Node renameNode(Node node, String string, String string1)
throws DOMException
{
return null;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -