public abstract class AbstractConfiguration extends Configuration {

	/**
	 * Argument for command line option "-dubboconfigpath".
	 */
	public String dubboconfigpath = "";

	/**
	 * Argument for command line option "-springcontextconfigpath".
	 */
	public String springcontextconfigpath = "";

	/**
	 * Argument for command line option "-excludedurlsxpath".
	 */
	public String excludedurlsxpath = "";

	/**
	 * Argument for command line option "-showannotationlist".
	 */
	public String showAnnotationList = "";

	/**
	 * Argument for command line option "-authkeyword".
	 */
	public String authKeyword = "";

	/**
	 * Argument for command line option "-noauthkeyword".
	 */
	public String noAuthKeyword = "";

	/**
	 * Argument for command line option "-branchname".
	 */
	@edu.umd.cs.findbugs.annotations.SuppressWarnings("URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
	public String branchname = "";

	/**
	 * Argument for command line option "-systemname".
	 */
	@edu.umd.cs.findbugs.annotations.SuppressWarnings("URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
	public String systemname = "";

	/**
	 * Argument for command line option "-codeurl".
	 */
	@edu.umd.cs.findbugs.annotations.SuppressWarnings("URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
	public String codeurl = "";

	/**
	 * Argument for command line option "-searchengine".
	 */
	@edu.umd.cs.findbugs.annotations.SuppressWarnings("URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
	public String searchengine = "http://127.0.0.1:8080/solr/apidocs";

	/**
	 * Argument for command line option "-buildid".
	 */
	@edu.umd.cs.findbugs.annotations.SuppressWarnings("URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
	public String buildid = "";

	/**
	 * Argument for command line option "-cmzfieldinclude".
	 */
	@edu.umd.cs.findbugs.annotations.SuppressWarnings("URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
	public String cmzFieldInclude = "";
	
	/**
	 * Argument for command line option "-cmzfieldexclude".
	 */
	@edu.umd.cs.findbugs.annotations.SuppressWarnings("URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
	public String cmzFieldExclude = "";
	
	@edu.umd.cs.findbugs.annotations.SuppressWarnings("MS_SHOULD_BE_FINAL")
	protected static AbstractConfiguration instance;
	
	@edu.umd.cs.findbugs.annotations.SuppressWarnings("UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD")
	public static AbstractConfiguration getInstance() {
		return instance;
	}	
} public class WRBriefTaglet implements Taglet {
	public static final String NAME = "brief";
	
	public String getName() {
		return NAME;
	}

	public boolean inConstructor() {
		return false;
	}

	public boolean inField() {
		return false;
	}

	public boolean inMethod() {
		return true;
	}

	public boolean inOverview() {
		return false;
	}

	public boolean inPackage() {
		return false;
	}

	public boolean inType() {
		return false;
	}

	public boolean isInlineTag() {
		return false;
	}

	public String toString(Tag tag) {
		return toString(new Tag[] { tag });
	}

	public String toString(Tag[] tags) {
        StringBuilder result = new StringBuilder();
        for (int i = 0; i< tags.length - 1; i++) {
            result.append(tags[i].text());
            result.append("/n");
        }
        if(tags.length > 0) {
        	result.append(tags[tags.length - 1].text());
        }
        return result.toString();
    }

    /**
     * Register this Taglet.
     * @param tagletMap  the map to register this tag to.
     */
    @SuppressWarnings("unchecked")
	public static void register(@SuppressWarnings("rawtypes") Map tagletMap) {
       WRTagTaglet tag = new WRTagTaglet();
       Taglet t = (Taglet) tagletMap.get(tag.getName());
       if (t != null) {
           tagletMap.remove(tag.getName());
       }
       tagletMap.put(tag.getName(), tag);
    }
} public class WREgdescriptionTaglet implements Taglet {
	public static final String NAME = "egdescription";
	
	public String getName() {
		return NAME;
	}

	public boolean inConstructor() {
		return false;
	}

	public boolean inField() {
		return false;
	}

	public boolean inMethod() {
		return true;
	}

	public boolean inOverview() {
		return false;
	}

	public boolean inPackage() {
		return false;
	}

	public boolean inType() {
		return false;
	}

	public boolean isInlineTag() {
		return false;
	}

	public String toString(Tag tag) {
		return toString(new Tag[] { tag });
	}

	public String toString(Tag[] tags) {
        StringBuilder result = new StringBuilder();
        for (int i = 0; i< tags.length - 1; i++) {
            result.append(tags[i].text());
            result.append("/n");
        }
        if(tags.length > 0) {
        	result.append(tags[tags.length - 1].text());
        }
        return result.toString();
    }

    /**
     * Register this Taglet.
     * @param tagletMap  the map to register this tag to.
     */
    @SuppressWarnings("unchecked")
	public static void register(@SuppressWarnings("rawtypes") Map tagletMap) {
       WRTagTaglet tag = new WRTagTaglet();
       Taglet t = (Taglet) tagletMap.get(tag.getName());
       if (t != null) {
           tagletMap.remove(tag.getName());
       }
       tagletMap.put(tag.getName(), tag);
    }
} public class WREgexternalvalueTaglet implements Taglet {
	public static final String NAME = "egexternalvalue";
	
	public String getName() {
		return NAME;
	}

	public boolean inConstructor() {
		return false;
	}

	public boolean inField() {
		return false;
	}

	public boolean inMethod() {
		return true;
	}

	public boolean inOverview() {
		return false;
	}

	public boolean inPackage() {
		return false;
	}

	public boolean inType() {
		return false;
	}

	public boolean isInlineTag() {
		return false;
	}

	public String toString(Tag tag) {
		return toString(new Tag[] { tag });
	}

	public String toString(Tag[] tags) {
        StringBuilder result = new StringBuilder();
        for (int i = 0; i< tags.length - 1; i++) {
            result.append(tags[i].text());
            result.append("/n");
        }
        if(tags.length > 0) {
        	result.append(tags[tags.length - 1].text());
        }
        return result.toString();
    }

    /**
     * Register this Taglet.
     * @param tagletMap  the map to register this tag to.
     */
    @SuppressWarnings("unchecked")
	public static void register(@SuppressWarnings("rawtypes") Map tagletMap) {
       WRTagTaglet tag = new WRTagTaglet();
       Taglet t = (Taglet) tagletMap.get(tag.getName());
       if (t != null) {
           tagletMap.remove(tag.getName());
       }
       tagletMap.put(tag.getName(), tag);
    }
} public class WREgnameTaglet implements Taglet {
	public static final String NAME = "egname";
	
	public String getName() {
		return NAME;
	}

	public boolean inConstructor() {
		return false;
	}

	public boolean inField() {
		return false;
	}

	public boolean inMethod() {
		return true;
	}

	public boolean inOverview() {
		return false;
	}

	public boolean inPackage() {
		return false;
	}

	public boolean inType() {
		return false;
	}

	public boolean isInlineTag() {
		return false;
	}

	public String toString(Tag tag) {
		return toString(new Tag[] { tag });
	}

	public String toString(Tag[] tags) {
        StringBuilder result = new StringBuilder();
        for (int i = 0; i< tags.length - 1; i++) {
            result.append(tags[i].text());
            result.append("/n");
        }
        if(tags.length > 0) {
        	result.append(tags[tags.length - 1].text());
        }
        return result.toString();
    }

    /**
     * Register this Taglet.
     * @param tagletMap  the map to register this tag to.
     */
    @SuppressWarnings("unchecked")
	public static void register(@SuppressWarnings("rawtypes") Map tagletMap) {
       WRTagTaglet tag = new WRTagTaglet();
       Taglet t = (Taglet) tagletMap.get(tag.getName());
       if (t != null) {
           tagletMap.remove(tag.getName());
       }
       tagletMap.put(tag.getName(), tag);
    }
} public class WREgsummaryTaglet implements Taglet {
	public static final String NAME = "egsummary";
	
	public String getName() {
		return NAME;
	}

	public boolean inConstructor() {
		return false;
	}

	public boolean inField() {
		return false;
	}

	public boolean inMethod() {
		return true;
	}

	public boolean inOverview() {
		return false;
	}

	public boolean inPackage() {
		return false;
	}

	public boolean inType() {
		return false;
	}

	public boolean isInlineTag() {
		return false;
	}

	public String toString(Tag tag) {
		return toString(new Tag[] { tag });
	}

	public String toString(Tag[] tags) {
        StringBuilder result = new StringBuilder();
        for (int i = 0; i< tags.length - 1; i++) {
            result.append(tags[i].text());
            result.append("/n");
        }
        if(tags.length > 0) {
        	result.append(tags[tags.length - 1].text());
        }
        return result.toString();
    }

    /**
     * Register this Taglet.
     * @param tagletMap  the map to register this tag to.
     */
    @SuppressWarnings("unchecked")
	public static void register(@SuppressWarnings("rawtypes") Map tagletMap) {
       WRTagTaglet tag = new WRTagTaglet();
       Taglet t = (Taglet) tagletMap.get(tag.getName());
       if (t != null) {
           tagletMap.remove(tag.getName());
       }
       tagletMap.put(tag.getName(), tag);
    }
} public class WREgvalueTaglet implements Taglet {
	public static final String NAME = "egvalue";
	
	public String getName() {
		return NAME;
	}

	public boolean inConstructor() {
		return false;
	}

	public boolean inField() {
		return false;
	}

	public boolean inMethod() {
		return true;
	}

	public boolean inOverview() {
		return false;
	}

	public boolean inPackage() {
		return false;
	}

	public boolean inType() {
		return false;
	}

	public boolean isInlineTag() {
		return false;
	}

	public String toString(Tag tag) {
		return toString(new Tag[] { tag });
	}

	public String toString(Tag[] tags) {
        StringBuilder result = new StringBuilder();
        for (int i = 0; i< tags.length - 1; i++) {
            result.append(tags[i].text());
            result.append("/n");
        }
        if(tags.length > 0) {
        	result.append(tags[tags.length - 1].text());
        }
        return result.toString();
    }

    /**
     * Register this Taglet.
     * @param tagletMap  the map to register this tag to.
     */
    @SuppressWarnings("unchecked")
	public static void register(@SuppressWarnings("rawtypes") Map tagletMap) {
       WRTagTaglet tag = new WRTagTaglet();
       Taglet t = (Taglet) tagletMap.get(tag.getName());
       if (t != null) {
           tagletMap.remove(tag.getName());
       }
       tagletMap.put(tag.getName(), tag);
    }
} public class WRMemoTaglet implements Taglet {
	public static final String NAME = "memo";
	
	public String getName() {
		return NAME;
	}

	public boolean inConstructor() {
		return false;
	}

	public boolean inField() {
		return false;
	}

	public boolean inMethod() {
		return true;
	}

	public boolean inOverview() {
		return false;
	}

	public boolean inPackage() {
		return false;
	}

	public boolean inType() {
		return false;
	}

	public boolean isInlineTag() {
		return false;
	}

	public String toString(Tag tag) {
		return toString(new Tag[] { tag });
	}

	public String toString(Tag[] tags) {
        StringBuilder result = new StringBuilder();
        for (int i = 0; i< tags.length - 1; i++) {
            result.append(tags[i].text());
            result.append("/n");
        }
        if(tags.length > 0) {
        	result.append(tags[tags.length - 1].text());
        }
        return result.toString();
    }

    /**
     * Register this Taglet.
     * @param tagletMap  the map to register this tag to.
     */
    @SuppressWarnings("unchecked")
	public static void register(@SuppressWarnings("rawtypes") Map tagletMap) {
       WRTagTaglet tag = new WRTagTaglet();
       Taglet t = (Taglet) tagletMap.get(tag.getName());
       if (t != null) {
           tagletMap.remove(tag.getName());
       }
       tagletMap.put(tag.getName(), tag);
    }
} public class WRMqConsumerTaglet implements Taglet {
	public static final String NAME = "mqConsumer";

	@Override
	public String getName() {
		return NAME;
	}

	@Override
	public boolean inConstructor() {
		return false;
	}

	@Override
	public boolean inField() {
		return false;
	}

	@Override
	public boolean inMethod() {
		return false;
	}

	@Override
	public boolean inOverview() {
		return false;
	}

	@Override
	public boolean inPackage() {
		return false;
	}

	@Override
	public boolean inType() {
		return false;
	}

	@Override
	public boolean isInlineTag() {
		return false;
	}

	public String toString(Tag tag) {
		return toString(new Tag[] { tag });
	}

	public String toString(Tag[] tags) {
		return WRMqConsumerTaglet.concat(tags);
	}

	public static String concat(Tag[] tags) {
		StringBuilder result = new StringBuilder();
		for (int i = 0; i < tags.length - 1; i++) {
			result.append(tags[i].text());
			result.append("/n");
		}
		if (tags.length > 0) {
			result.append(tags[tags.length - 1].text());
		}
		return result.toString();
	}

	/**
	 * Register this Taglet.
	 * 
	 * @param tagletMap
	 *            the map to register this tag to.
	 */
	@SuppressWarnings("unchecked")
	public static void register(@SuppressWarnings("rawtypes") Map tagletMap) {
		WRMqConsumerTaglet tag = new WRMqConsumerTaglet();
		Taglet t = (Taglet) tagletMap.get(tag.getName());
		if (t != null) {
			tagletMap.remove(tag.getName());
		}
		tagletMap.put(tag.getName(), tag);
	}

} public class WRMqProducerTaglet implements Taglet {
	public static final String NAME = "mqProducer";

	@Override
	public String getName() {
		return NAME;
	}

	@Override
	public boolean inConstructor() {
		return false;
	}

	@Override
	public boolean inField() {
		return false;
	}

	@Override
	public boolean inMethod() {
		return false;
	}

	@Override
	public boolean inOverview() {
		return false;
	}

	@Override
	public boolean inPackage() {
		return false;
	}

	@Override
	public boolean inType() {
		return false;
	}

	@Override
	public boolean isInlineTag() {
		return false;
	}

	public String toString(Tag tag) {
		return toString(new Tag[] { tag });
	}

	public String toString(Tag[] tags) {
		return WRMqProducerTaglet.concat(tags);
	}

	public static String concat(Tag[] tags) {
		StringBuilder result = new StringBuilder();
		for (int i = 0; i < tags.length - 1; i++) {
			result.append(tags[i].text());
			result.append("/n");
		}
		if (tags.length > 0) {
			result.append(tags[tags.length - 1].text());
		}
		return result.toString();
	}

	/**
	 * Register this Taglet.
	 * 
	 * @param tagletMap
	 *            the map to register this tag to.
	 */
	@SuppressWarnings("unchecked")
	public static void register(@SuppressWarnings("rawtypes") Map tagletMap) {
		WRMqProducerTaglet tag = new WRMqProducerTaglet();
		Taglet t = (Taglet) tagletMap.get(tag.getName());
		if (t != null) {
			tagletMap.remove(tag.getName());
		}
		tagletMap.put(tag.getName(), tag);
	}

} public class WROccursTaglet implements Taglet {
	public static final String NAME = "occurs";
	public static final String REQUIRED = "required";
	public static final String OPTIONAL = "optional";
	public static final String DEPENDS = "depends";
	
	public String getName() {
		return NAME;
	}

	public boolean inConstructor() {
		return false;
	}

	public boolean inField() {
		return false;
	}

	public boolean inMethod() {
		return true;
	}

	public boolean inOverview() {
		return false;
	}

	public boolean inPackage() {
		return false;
	}

	public boolean inType() {
		return false;
	}

	public boolean isInlineTag() {
		return false;
	}

	public String toString(Tag tag) {
		return toString(new Tag[] { tag });
	}

	public String toString(Tag[] tags) {
        StringBuilder result = new StringBuilder();
        for (int i = 0; i< tags.length - 1; i++) {
            result.append(tags[i].text());
            result.append("/n");
        }
        if(tags.length > 0) {
        	result.append(tags[tags.length - 1].text());
        }
        return result.toString();
    }

    /**
     * Register this Taglet.
     * @param tagletMap  the map to register this tag to.
     */
    @SuppressWarnings("unchecked")
	public static void register(@SuppressWarnings("rawtypes") Map tagletMap) {
       WRTagTaglet tag = new WRTagTaglet();
       Taglet t = (Taglet) tagletMap.get(tag.getName());
       if (t != null) {
           tagletMap.remove(tag.getName());
       }
       tagletMap.put(tag.getName(), tag);
    }
} public class WRParamTaglet extends AbstractWRParamTaglet {
	public static final String NAME = "wr.param";

	@Override
	public String getName() {
		return NAME;
	}

	/**
	 * Register this Taglet.
	 * 
	 * @param tagletMap
	 *            the map to register this tag to.
	 */
	@SuppressWarnings("unchecked")
	public static void register(@SuppressWarnings("rawtypes") Map tagletMap) {
		WRParamTaglet tag = new WRParamTaglet();
		Taglet t = (Taglet) tagletMap.get(tag.getName());
		if (t != null) {
			tagletMap.remove(tag.getName());
		}
		tagletMap.put(tag.getName(), tag);
	}
} public class WRRefReqTaglet implements Taglet {
	public static final String NAME = "refReq";

	@Override
	public String getName() {
		return NAME;
	}

	@Override
	public boolean inConstructor() {
		return false;
	}

	@Override
	public boolean inField() {
		return false;
	}

	@Override
	public boolean inMethod() {
		return false;
	}

	@Override
	public boolean inOverview() {
		return false;
	}

	@Override
	public boolean inPackage() {
		return false;
	}

	@Override
	public boolean inType() {
		return false;
	}

	@Override
	public boolean isInlineTag() {
		return false;
	}

	@Override
	public String toString(Tag tag) {
		return toString(new Tag[] { tag });
	}

	@Override
	public String toString(Tag[] tags) {
		return WRRefReqTaglet.concat(tags);
	}

	public static String concat(Tag[] tags) {
		StringBuilder result = new StringBuilder();
		for (int i = 0; i < tags.length - 1; i++) {
			result.append(tags[i].text());
			result.append("/n");
		}
		if (tags.length > 0) {
			result.append(tags[tags.length - 1].text());
		}
		return result.toString();
	}

	/**
	 * Register this Taglet.
	 * 
	 * @param tagletMap
	 *            the map to register this tag to.
	 */
	@SuppressWarnings("unchecked")
	public static void register(@SuppressWarnings("rawtypes") Map tagletMap) {
		WRRefReqTaglet tag = new WRRefReqTaglet();
		Taglet t = (Taglet) tagletMap.get(tag.getName());
		if (t != null) {
			tagletMap.remove(tag.getName());
		}
		tagletMap.put(tag.getName(), tag);
	}

} public class WRReturnCodeTaglet implements Taglet {
	public static final String NAME = "returnCode";
	
	public String getName() {
		return NAME;
	}

	public boolean inConstructor() {
		return false;
	}

	public boolean inField() {
		return false;
	}

	public boolean inMethod() {
		return true;
	}

	public boolean inOverview() {
		return false;
	}

	public boolean inPackage() {
		return false;
	}

	public boolean inType() {
		return false;
	}

	public boolean isInlineTag() {
		return false;
	}

	public String toString(Tag tag) {
		return toString(new Tag[] { tag });
	}

	public String toString(Tag[] tags) {
		return WRReturnCodeTaglet.concat(tags);
   }
	
	public static String concat(Tag[] tags) {
        StringBuilder result = new StringBuilder();
        for (int i = 0; i< tags.length - 1; i++) {
            result.append(tags[i].text());
            result.append("/n");
        }
        if(tags.length > 0) {
        	result.append(tags[tags.length - 1].text());
        }
        return result.toString();		
	}

    /**
     * Register this Taglet.
     * @param tagletMap  the map to register this tag to.
     */
    @SuppressWarnings("unchecked")
	public static void register(@SuppressWarnings("rawtypes") Map tagletMap) {
       WRTagTaglet tag = new WRTagTaglet();
       Taglet t = (Taglet) tagletMap.get(tag.getName());
       if (t != null) {
           tagletMap.remove(tag.getName());
       }
       tagletMap.put(tag.getName(), tag);
    }
} public class WRReturnTaglet extends AbstractWRParamTaglet {
	public static final String NAME = "wr.return";

	@Override
	public String getName() {
		return NAME;
	}

	/**
	 * Register this Taglet.
	 * 
	 * @param tagletMap
	 *            the map to register this tag to.
	 */
	@SuppressWarnings("unchecked")
	public static void register(@SuppressWarnings("rawtypes") Map tagletMap) {
		WRReturnTaglet tag = new WRReturnTaglet();
		Taglet t = (Taglet) tagletMap.get(tag.getName());
		if (t != null) {
			tagletMap.remove(tag.getName());
		}
		tagletMap.put(tag.getName(), tag);
	}
} public class WRTagTaglet implements Taglet {
	public static final String NAME = "tag";
	private static final String SPLITTER = ",";

	public String getName() {
		return NAME;
	}

	public boolean inConstructor() {
		return false;
	}

	public boolean inField() {
		return false;
	}

	public boolean inMethod() {
		return true;
	}

	public boolean inOverview() {
		return false;
	}

	public boolean inPackage() {
		return false;
	}

	public boolean inType() {
		return false;
	}

	public boolean isInlineTag() {
		return false;
	}

	public String toString(Tag tag) {
		return toString(new Tag[] { tag });
	}

	public String toString(Tag[] tags) {
		return WRTagTaglet.concatToString(tags);
	}

	public static String concatToString(Tag[] tags) {
		StringBuilder result = new StringBuilder();
		for (int i = 0; i < tags.length - 1; i++) {
			result.append(tags[i].text());
			result.append(SPLITTER);
		}
		if (tags.length > 0) {
			result.append(tags[tags.length - 1].text());
		}
		return result.toString();
	}
	
	/**
	 * Split string to get tag set.
	 * 
	 * @param tags
	 *            the String of tags to split.
	 * @return set of tags.
	 */
	public static Set<String> getTagSet(String tags) {
		tags = StringUtils.substringBefore(tags, "\n");
		String[] tagArr = tags.split("[\\s,，;；]");
		Set<String> tagSet = new HashSet<String>();
		for (int i = 0; i < tagArr.length; i++) {
			String tag = tagArr[i].trim();
			if (!tag.isEmpty()) {
				tagSet.add(tag);
			}
		}
		return tagSet;
	}

	/**
	 * Register this Taglet.
	 * 
	 * @param tagletMap
	 *            the map to register this tag to.
	 */
	@SuppressWarnings("unchecked")
	public static void register(@SuppressWarnings("rawtypes") Map tagletMap) {
		WRTagTaglet tag = new WRTagTaglet();
		Taglet t = (Taglet) tagletMap.get(tag.getName());
		if (t != null) {
			tagletMap.remove(tag.getName());
		}
		tagletMap.put(tag.getName(), tag);
	}
} public class ApplicationContextConfig {
	static private String stopClasses = null;
	
	static {
		loadConfigFile();
	}

	synchronized static public void loadConfigFile() {
		if (stopClasses == null) {
			InputStream is = ApplicationContextConfig.class
					.getResourceAsStream("/wrdoclet.properties");
			Properties props = new Properties();
			try {
				props.load(is);
				stopClasses = props.getProperty("stop.classes");
			} catch (Exception e) {
				LoggerFactory.getLogger(ApplicationContextConfig.class).error(
						"不能读取属性文件. "
						+ "请确保wrdoclet.properties在CLASSPATH指定的路径中");
			} finally {
				try {
					is.close();
				} catch (IOException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
		}
	}
	
	public static String getStopClasses() {
		if (stopClasses == null) {
			loadConfigFile();
		}
		return stopClasses;
	}
} public class Logger {
	protected Log mvnLog;
	protected org.slf4j.Logger slf4jLog;
	
	public Log getMvnLog() {
		return this.mvnLog;
	}
	
    public void setMvnLog(Log mvnLog) {
        this.mvnLog = mvnLog;
    }	
    public org.slf4j.Logger getSlf4jLog() {
    	return this.slf4jLog;
    }
    
    public void setSlf4jLog(org.slf4j.Logger slf4jLog) {
        this.slf4jLog = slf4jLog;
    }	
    
	public boolean isDebugEnabled() {
		if(this.mvnLog != null) {
			return this.mvnLog.isDebugEnabled();			
		} else if(this.slf4jLog != null) {
			return this.slf4jLog.isDebugEnabled();
		} else {
			return false;
		}
	}

	public void debug(CharSequence paramCharSequence) {
		if(this.mvnLog != null) {
			this.mvnLog.debug(paramCharSequence);		
		} else {
			this.slf4jLog.debug(paramCharSequence.toString());
		}
	}

	public void debug(CharSequence paramCharSequence,
			Throwable paramThrowable) {
		if(this.mvnLog != null) {
			this.mvnLog.debug(paramCharSequence, paramThrowable);		
		} else {
			this.slf4jLog.debug(paramCharSequence.toString(), paramThrowable);
		}		
	}

	public void debug(Throwable paramThrowable) {
		if(this.mvnLog != null) {
			this.mvnLog.debug(paramThrowable);		
		} else {
			this.slf4jLog.debug("", paramThrowable);
		}	
	}

	public boolean isInfoEnabled() {
		if(this.mvnLog != null) {
			return this.mvnLog.isInfoEnabled();			
		} else if(this.slf4jLog != null) {
			return this.slf4jLog.isInfoEnabled();
		} else {
			return false;
		}		
	}

	public void info(CharSequence paramCharSequence) {
		if(this.mvnLog != null) {
			this.mvnLog.info(paramCharSequence);		
		} else {
			this.slf4jLog.info(paramCharSequence.toString());
		}
	}

	public void info(CharSequence paramCharSequence,
			Throwable paramThrowable) {
		if(this.mvnLog != null) {
			this.mvnLog.info(paramCharSequence, paramThrowable);		
		} else {
			this.slf4jLog.info(paramCharSequence.toString(), paramThrowable);
		}
	}

	public void info(Throwable paramThrowable) {
		if(this.mvnLog != null) {
			this.mvnLog.info(paramThrowable);		
		} else {
			this.slf4jLog.info("", paramThrowable);
		}
	}

	public boolean isWarnEnabled() {
		if(this.mvnLog != null) {
			return this.mvnLog.isWarnEnabled();			
		} else if(this.slf4jLog != null) {
			return this.slf4jLog.isWarnEnabled();
		} else {
			return false;
		}				
	}

	public void warn(CharSequence paramCharSequence) {
		if(this.mvnLog != null) {
			this.mvnLog.warn(paramCharSequence);		
		} else {
			this.slf4jLog.warn(paramCharSequence.toString());
		}		
	}

	public void warn(CharSequence paramCharSequence,
			Throwable paramThrowable) {
		if(this.mvnLog != null) {
			this.mvnLog.warn(paramCharSequence, paramThrowable);		
		} else {
			this.slf4jLog.warn(paramCharSequence.toString(), paramThrowable);
		}
	}

	public void warn(Throwable paramThrowable) {
		if(this.mvnLog != null) {
			this.mvnLog.warn(paramThrowable);		
		} else {
			this.slf4jLog.warn("", paramThrowable);
		}
	}

	public boolean isErrorEnabled() {
		if(this.mvnLog != null) {
			return this.mvnLog.isErrorEnabled();			
		} else if(this.slf4jLog != null) {
			return this.slf4jLog.isErrorEnabled();
		} else {
			return false;
		}
	}

	public void error(CharSequence paramCharSequence) {
		if(this.mvnLog != null) {
			this.mvnLog.error(paramCharSequence);		
		} else {
			this.slf4jLog.error(paramCharSequence.toString());
		}		
	}

	public void error(CharSequence paramCharSequence,
			Throwable paramThrowable) {
		if(this.mvnLog != null) {
			this.mvnLog.error(paramCharSequence, paramThrowable);		
		} else {
			this.slf4jLog.error(paramCharSequence.toString(), paramThrowable);
		}		
	}

	public void error(Throwable paramThrowable) {
		if(this.mvnLog != null) {
			this.mvnLog.error(paramThrowable);		
		} else {
			this.slf4jLog.error("", paramThrowable);
		}
	}
} public final class LoggerFactory {
	static Logger logger = new Logger();
	
    public static void setLog(Log log) {
		logger.setMvnLog(log);
    }
	
	public static Logger getLogger(@SuppressWarnings("rawtypes") Class clazz) {
		return getLogger(clazz.getName());
	}
	
	public static Logger getLogger(String name) {
		logger.setSlf4jLog(org.slf4j.LoggerFactory.getLogger(name));
		return logger;		
	}
}
import java.io.File;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.AbstractMap;
import java.util.AbstractMap.SimpleEntry;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import net.winroad.wrdoclet.AbstractConfiguration;
import net.winroad.wrdoclet.data.*;
import net.winroad.wrdoclet.taglets.WRBriefTaglet;
import net.winroad.wrdoclet.taglets.WREgdescriptionTaglet;
import net.winroad.wrdoclet.taglets.WREgexternalvalueTaglet;
import net.winroad.wrdoclet.taglets.WREgnameTaglet;
import net.winroad.wrdoclet.taglets.WREgsummaryTaglet;
import net.winroad.wrdoclet.taglets.WREgvalueTaglet;
import net.winroad.wrdoclet.taglets.WRMemoTaglet;
import net.winroad.wrdoclet.taglets.WRMqConsumerTaglet;
import net.winroad.wrdoclet.taglets.WRMqProducerTaglet;
import net.winroad.wrdoclet.taglets.WROccursTaglet;
import net.winroad.wrdoclet.taglets.WRParamTaglet;
import net.winroad.wrdoclet.taglets.WRRefReqTaglet;
import net.winroad.wrdoclet.taglets.WRReturnCodeTaglet;
import net.winroad.wrdoclet.taglets.WRReturnTaglet;
import net.winroad.wrdoclet.taglets.WRTagTaglet;
import net.winroad.wrdoclet.utils.ApplicationContextConfig;
import net.winroad.wrdoclet.utils.Logger;
import net.winroad.wrdoclet.utils.LoggerFactory;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.util.CollectionUtils;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.xml.sax.SAXException;
import com.sun.javadoc.AnnotationDesc;
import com.sun.javadoc.ClassDoc;
import com.sun.javadoc.FieldDoc;
import com.sun.javadoc.MemberDoc;
import com.sun.javadoc.MethodDoc;
import com.sun.javadoc.ParamTag;
import com.sun.javadoc.Parameter;
import com.sun.javadoc.ParameterizedType;
import com.sun.javadoc.ProgramElementDoc;
import com.sun.javadoc.Tag;
import com.sun.javadoc.Type;
import com.sun.javadoc.AnnotationDesc.ElementValuePair;
import com.sun.tools.doclets.internal.toolkit.Configuration;
import com.sun.tools.doclets.internal.toolkit.util.Util;
	 * @return 0 for anonymous allowed, 1 for authentication needed, others for not
	 *         specified.
	 */
	protected abstract int isAPIAuthNeeded(String url);

	protected abstract boolean isOpenAPIMethod(MethodDoc methodDoc);

	protected abstract RequestMapping parseRequestMapping(MethodDoc methodDoc);

	protected abstract RequestMapping parseRequestMapping(ClassDoc classDoc);

	protected abstract APIParameter getOutputParam(MethodDoc methodDoc);

	protected abstract APIParameter getOutputParam(ClassDoc classDoc);

	protected abstract List<APIParameter> getInputParams(MethodDoc methodDoc);

	protected abstract APIParameter getInputParams(ClassDoc classDoc);

	protected String getParamComment(MethodDoc method, String paramName) {
		ParamTag[] paramTags = method.paramTags();
		for (ParamTag paramTag : paramTags) {
			if (paramTag.parameterName().equals(paramName)) {
				return paramTag.parameterComment();
			}
		}
		return null;
	}

	protected boolean isProgramElementDocAnnotatedWith(ProgramElementDoc elementDoc, String annotation) {
		AnnotationDesc[] annotations = elementDoc.annotations();
		for (int i = 0; i < annotations.length; i++) {
			if (annotations[i].annotationType().qualifiedTypeName().equals(annotation)) {
				return true;
			}
		}
		return false;
	}

	protected ModificationHistory getModificationHistory(ClassDoc classDoc) {
		ModificationHistory history = new ModificationHistory();
		if (classDoc != null) {
			LinkedList<ModificationRecord> list = this.getModificationRecords(classDoc);
			history.addModificationRecords(list);
		}
		return history;
	}

	/*
	 * get the modification history of the class.
	 */
	protected ModificationHistory getModificationHistory(Type type) {
		ModificationHistory history = new ModificationHistory();
		ClassDoc classDoc = this.wrDoc.getConfiguration().root.classNamed(type.qualifiedTypeName());
		if (classDoc != null) {
			LinkedList<ModificationRecord> list = this.getModificationRecords(classDoc);
			history.addModificationRecords(list);
		}
		return history;
	}

	/*
	 * get the modification history of the method.
	 */
	protected ModificationHistory getModificationHistory(MethodDoc methodDoc) {
		ModificationHistory history = new ModificationHistory();
		history.addModificationRecords(this.parseModificationRecords(methodDoc.tags()));
		return history;
	}

	/*
	 * get the modification records of the class.
	 */
	protected LinkedList<ModificationRecord> getModificationRecords(ClassDoc classDoc) {
		ClassDoc superClass = classDoc.superclass();
		if (superClass == null) {
			return new LinkedList<ModificationRecord>();
		}
		LinkedList<ModificationRecord> result = this.getModificationRecords(superClass);
		result.addAll(this.parseModificationRecords(classDoc.tags()));
		return result;
	}

	/*
	 * Parse tags to get customized parameters.
	 */
	protected LinkedList<APIParameter> parseCustomizedParameters(MethodDoc methodDoc) {
		Tag[] tags = methodDoc.tags(WRParamTaglet.NAME);
		LinkedList<APIParameter> result = new LinkedList<APIParameter>();
		for (int i = 0; i < tags.length; i++) {
			result.add(WRParamTaglet.parse(tags[i].text()));
		}
		return result;
	}

	/*
	 * Parse tags to get customized return.
	 */
	protected APIParameter parseCustomizedReturn(MethodDoc methodDoc) {
		Tag[] tags = methodDoc.tags(WRReturnTaglet.NAME);
		APIParameter result = null;
		if (tags.length > 0) {
			result = WRReturnTaglet.parse(tags[0].text());
		}
		return result;
	}

	/*
	 * Parse tags to get modification records.
	 */
	protected LinkedList<ModificationRecord> parseModificationRecords(Tag[] tags) {
		LinkedList<ModificationRecord> result = new LinkedList<ModificationRecord>();
		for (int i = 0; i < tags.length; i++) {
			if ("@author".equalsIgnoreCase(tags[i].name())) {
				ModificationRecord record = new ModificationRecord();
				record.setModifier(tags[i].text());

				if (i + 1 < tags.length) {
					if ("@version".equalsIgnoreCase(tags[i + 1].name())) {
						record.setVersion(tags[i + 1].text());
						if (i + 2 < tags.length && ("@" + WRMemoTaglet.NAME).equalsIgnoreCase(tags[i + 2].name())) {