📄 javadoccomment.java
字号:
package lolo.scans;/** A recognizer class to scan for javadoc comments. * <p>By default these symbols will be ignored. * * @author <a href="http://www.inf.uos.de/bernd" target="_blank">Bernd Kühl</a> (<a href="mailto:bernd@informatik.uni-osnabrueck.de">bernd@informatik.uni-osnabrueck.de</a>) */public class JavadocComment extends SlashSlashComment { /** The legal characters. */ // A means ANY protected static final String chars = "A*/"; /** The state table. */ protected static final int newState [][] = { // current state, input => newstate // ANY * / { 7, 7, 1 }, // state 0, find / { 7, 2, 7 }, // state 1, find * for /* { 7, 3, 7 }, // state 2, find * for /** { 4, 4, 7 }, // state 3, find * or any, /**/...*/ is no legal javadoc comment { 4, 5, 4 }, // state 4, find * or any { 4, 5, 6 } // state 5, find / for */ // state 6, comment found // state 7, error }; public State nextChar(char ch) { // is ch a legal input character? int input = chars.indexOf(ch); if (input < 0) input = 0; boolean found = false, more = false; state = newState[state][input]; switch(state) { case 7: break; // error state, parse ends case 0: new RuntimeException("illegal state "+state); // cann't be.. case 1: case 2: case 3: case 4: case 5: more = true; break; case 6: found = true; break; default: new RuntimeException("illegal state "+state); // cann't be.. } return stateObject.set(more, found); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -