Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

11
LINES

< > BotCompany Repo | #1001162 - getClassDeclarationName (also works with interfaces and enums)

JavaX fragment (include)

please include function allClasses.

sS getClassDeclarationName(L<S> tok) {
  if (tok != null)
    for (int i = 1; i+2 < tok.size(); i += 2)
      if (allClasses_keywords.contains(tok.get(i)) && isIdentifier(tok.get(i+2))) {
        if (eqGet(tok, i+2, "noeq")) i += 2;
        ret tok.get(i+2);
      }
  null;
}

download  show line numbers  debug dex   

Travelled to 11 computer(s): aoiabmzegqzx, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, tslmcundralx, tvejysmllsmz

No comments. add comment

Snippet ID: #1001162
Snippet name: getClassDeclarationName (also works with interfaces and enums)
Eternal ID of this version: #1001162/6
Text MD5: d191fe7a6a0e7cdb255d371d89fe1bc9
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-07-01 02:06:38
Source code size: 325 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 437 / 1970
Version history: 5 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1001162 & http://1001162.tinybrain.de