Converted all CRLF to LF.
[indepmod/mmn.git] / IndependentModeler / src / cz / cvut / promod / services / pluginLoaderService / utils / PluginDetails.java
blobc77717e973ad958fda9cca4f1ebaa2eccebfe5e2
1 package cz.cvut.promod.services.pluginLoaderService.utils;
3 import java.util.List;
4 import java.util.LinkedList;
6 /**
7 * ProMod, master thesis project
8 * User: Petr Zverina, petr.zverina@gmail.com
9 * Date: 22:50:27, 4.2.2010
12 /**
13 * Holds loaded info about the plugin(s) from the plugin configuration file.
15 public class PluginDetails{
17 private final String clazz;
19 private final String config;
21 private final String alias;
23 private final List<PluginDetails> modules;
25 /**
26 * Constructs new PluginDetails object.
28 * @param clazz is the plugin's class ful qualified name
29 * @param config is the plugin's configuration file
30 * @param alias is the plugin's alias
32 public PluginDetails(final String clazz, final String config, final String alias) {
33 this.clazz = clazz;
34 this.config = config;
35 this.alias = alias;
37 modules = new LinkedList<PluginDetails>();
40 /**
41 * Notations have it's modules, these modules are stored in list
43 * Do not use with extensions!
45 * @param pluginDetails is the plugin detail of the module
47 public void addPluginDetails(final PluginDetails pluginDetails){
48 modules.add(pluginDetails);
51 /**
52 * Returns the full qualified class name.
54 * @return full qualified class name
56 public String getClazz() {
57 return clazz;
60 /**
61 * Returns the plugin's configuration class.
63 * @return plugin's configuration file
65 public String getConfig() {
66 return config;
69 /**
70 * Returns the plugin's alias.
72 * @return plugin's alias
74 public String getAlias() {
75 return alias;
78 /**
79 * Returns all modules of the notation.
81 * Do not use with extensions!
83 * @return the list of notation's modules.
85 public List<PluginDetails> getModules() {
86 return modules;
89 /**
90 * Pops loaded module = returns module in style FIFO
92 * Do not use with extensions.
94 * @return the most earlier loaded module in the list
96 public PluginDetails pop() {
97 if(modules.size() != 0){
98 return modules.remove(0);
101 return null;