Here you can find the source of typeToTag(String TheType)
Parameter | Description |
---|---|
TheType | class name |
public static String typeToTag(String TheType)
//package com.java2s; //License from project: Apache License public class Main { /**// w ww .j ava2 s . c om * { field * * @name gPrimativeTypes * @function names of java primative types * } */ protected static final String gPrimativeTypes[] = { "int", "float", "boolean", "double", "byte", "char", "short", "long" }; /** * { method * * @param TheType class name * @return the tag string * } * @name typeToTag * @function convert a class name to tag for HTML documentation - primative * types return unaltered */ public static String typeToTag(String TheType) { if (isPrimitiveType(TheType)) { return (TheType); } else { return ("<a href=\"" + TheType + ".html#_top_" + "\">" + TheType + "</a>"); } } /** * { method * * @param ClassName name * @return true is primative * } * @name isPrimitiveType * @function true if name is a primative type i.e. int, String */ public static boolean isPrimitiveType(String ClassName) { for (int i = 0; i < gPrimativeTypes.length; i++) { if (ClassName.equals(gPrimativeTypes[i])) { return (true); } } return (false); } }