1 package com.atlassian.plugin.parsers;
2
3 import org.dom4j.*;
4
5 import static com.google.common.base.Preconditions.checkNotNull;
6 import static com.google.common.base.Preconditions.checkState;
7
8
9
10
11
12
13 public final class ModuleReader
14 {
15 private final Element module;
16
17 public ModuleReader(Element module)
18 {
19 this.module = checkNotNull(module);
20 checkState(!(module instanceof CharacterData), "Module elements cannot be text nodes!");
21 }
22
23 public String getType()
24 {
25 return module.getName();
26 }
27 }