From c015d586d22b69078b6da61858e5675793856b0b Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 25 May 2008 08:10:13 +0000 Subject: JAutoDoc :) --- sources/events/VSRegisteredEvents.java | 92 ++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) (limited to 'sources/events/VSRegisteredEvents.java') diff --git a/sources/events/VSRegisteredEvents.java b/sources/events/VSRegisteredEvents.java index 2643d6f..d41ffea 100644 --- a/sources/events/VSRegisteredEvents.java +++ b/sources/events/VSRegisteredEvents.java @@ -1,3 +1,7 @@ +/* + * VS is (c) 2008 by Paul C. Buetow + * vs@dev.buetow.org + */ package events; import java.util.*; @@ -6,13 +10,32 @@ import prefs.*; import core.*; import utils.*; +// TODO: Auto-generated Javadoc +/** + * The Class VSRegisteredEvents. + */ public final class VSRegisteredEvents { + + /** The event classnames. */ private static HashMap eventClassnames; + + /** The event shortnames. */ private static HashMap eventShortnames; + + /** The event names. */ private static HashMap eventNames; + + /** The editable protocols classnames. */ private static ArrayList editableProtocolsClassnames; + + /** The prefs. */ private static VSPrefs prefs; + /** + * Inits the. + * + * @param prefs_ the prefs_ + */ public static void init(VSPrefs prefs_) { prefs = prefs_; eventNames = new HashMap(); @@ -42,10 +65,20 @@ public final class VSRegisteredEvents { } } + /** + * Gets the editable protocols classnames. + * + * @return the editable protocols classnames + */ public static ArrayList getEditableProtocolsClassnames() { return editableProtocolsClassnames; } + /** + * Gets the protocol names. + * + * @return the protocol names + */ public static Vector getProtocolNames() { Set set = eventClassnames.keySet(); Vector vector = new Vector(); @@ -59,6 +92,11 @@ public final class VSRegisteredEvents { return vector; } + /** + * Gets the protocol classnames. + * + * @return the protocol classnames + */ public static Vector getProtocolClassnames() { Set set = eventNames.keySet(); Vector vector = new Vector(); @@ -72,6 +110,11 @@ public final class VSRegisteredEvents { return vector; } + /** + * Gets the non protocol names. + * + * @return the non protocol names + */ public static Vector getNonProtocolNames() { Set set = eventClassnames.keySet(); Vector vector = new Vector(); @@ -85,6 +128,11 @@ public final class VSRegisteredEvents { return vector; } + /** + * Gets the non protocol classnames. + * + * @return the non protocol classnames + */ public static Vector getNonProtocolClassnames() { Set set = eventNames.keySet(); Vector vector = new Vector(); @@ -98,18 +146,47 @@ public final class VSRegisteredEvents { return vector; } + /** + * Gets the classname. + * + * @param eventName the event name + * + * @return the classname + */ public static String getClassname(String eventName) { return eventClassnames.get(eventName); } + /** + * Gets the name. + * + * @param eventClassname the event classname + * + * @return the name + */ public static String getName(String eventClassname) { return eventNames.get(eventClassname); } + /** + * Gets the shortname. + * + * @param eventClassname the event classname + * + * @return the shortname + */ public static String getShortname(String eventClassname) { return eventShortnames.get(eventClassname); } + /** + * Creates the event instance by classname. + * + * @param eventClassname the event classname + * @param process the process + * + * @return the vS event + */ public static VSEvent createEventInstanceByClassname(String eventClassname, VSProcess process) { final Object protocolObj = new VSClassLoader().newInstance(eventClassname); @@ -122,10 +199,25 @@ public final class VSRegisteredEvents { return null; } + /** + * Creates the event instance by name. + * + * @param eventName the event name + * @param process the process + * + * @return the vS event + */ public static VSEvent createEventInstanceByName(String eventName, VSProcess process) { return createEventInstanceByClassname(eventClassnames.get(eventName), process); } + /** + * Register event. + * + * @param eventClassname the event classname + * @param eventName the event name + * @param eventShortname the event shortname + */ private static void registerEvent(String eventClassname, String eventName, String eventShortname) { if (eventShortname == null) eventShortname = eventName; -- cgit v1.2.3