Source code: org/alicebot/server/core/processor/loadtime/StartupElementProcessor.java
1 // Decompiled by Jad v1.5.8c. Copyright 2001 Pavel Kouznetsov.
2 // Jad home page: http://www.geocities.com/kpdus/jad.html
3 // Decompiler options: packimports(3)
4
5 package org.alicebot.server.core.processor.loadtime;
6
7 import org.alicebot.server.core.parser.*;
8 import org.alicebot.server.core.processor.Processor;
9 import org.alicebot.server.core.processor.ProcessorException;
10 import org.alicebot.server.core.util.Toolkit;
11
12 // Referenced classes of package org.alicebot.server.core.processor.loadtime:
13 // InvalidStartupElementException
14
15 public abstract class StartupElementProcessor extends Processor
16 {
17
18 public StartupElementProcessor()
19 {
20 }
21
22 public String process(int i, XMLNode xmlnode, GenericParser genericparser)
23 throws ProcessorException
24 {
25 try
26 {
27 return process(i, xmlnode, (StartupFileParser)genericparser);
28 }
29 catch(ClassCastException classcastexception)
30 {
31 throw new ProcessorException("Tried to pass a non-StartupFileParser to a StartupElementProcessor.");
32 }
33 }
34
35 public abstract String process(int i, XMLNode xmlnode, StartupFileParser startupfileparser)
36 throws InvalidStartupElementException;
37
38 protected String getHref(XMLNode xmlnode)
39 {
40 return Toolkit.getAttributeValue("href", xmlnode.XMLAttr);
41 }
42
43 protected static final String HREF = "href";
44 }