1 21 package au.id.jericho.lib.html; 22 23 33 public final class MasonTagTypes { 34 35 58 public static final StartTagType MASON_COMPONENT_CALL=StartTagTypeMasonComponentCall.INSTANCE; 59 60 85 public static final StartTagType MASON_COMPONENT_CALLED_WITH_CONTENT=StartTagTypeMasonComponentCalledWithContent.INSTANCE; 86 87 112 public static final EndTagType MASON_COMPONENT_CALLED_WITH_CONTENT_END=EndTagTypeMasonComponentCalledWithContent.INSTANCE; 113 114 144 public static final StartTagType MASON_NAMED_BLOCK=StartTagTypeMasonNamedBlock.INSTANCE; 145 146 171 public static final EndTagType MASON_NAMED_BLOCK_END=EndTagTypeMasonNamedBlock.INSTANCE; 172 173 private static final TagType[] TAG_TYPES={ 174 MASON_COMPONENT_CALL, 175 MASON_COMPONENT_CALLED_WITH_CONTENT, 176 MASON_COMPONENT_CALLED_WITH_CONTENT_END, 177 MASON_NAMED_BLOCK, 178 MASON_NAMED_BLOCK_END 179 }; 180 181 private MasonTagTypes() {} 182 183 188 public static void register() { 189 for (int i=0; i<TAG_TYPES.length; i++) TAG_TYPES[i].register(); 190 } 191 192 198 public static boolean defines(final TagType tagType) { 199 for (int i=0; i<TAG_TYPES.length; i++) 200 if (tagType==TAG_TYPES[i]) return true; 201 return false; 202 } 203 204 213 public static boolean isParsedByMason(final TagType tagType) { 214 return tagType==StartTagType.SERVER_COMMON || defines(tagType); 215 } 216 } 217 | Popular Tags |