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