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

7
LINES

< > BotCompany Repo | #1002201 // hasModifier

JavaX fragment (include)

// scans a Java construct (class, method) and checks its modifiers
static boolean hasModifier(L<S> tok, S modifier) {
  for (int i = 1; i < tok.size() && getJavaModifiers().contains(tok.get(i)); i += 2)
    if (tok.get(i).equals(modifier))
      return true;
  return false;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1002201
Snippet name: hasModifier
Eternal ID of this version: #1002201/1
Text MD5: 25b58f78e6e6d92a7981475b20fcde17
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-12-31 22:58:06
Source code size: 284 bytes / 7 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 627 / 1099
Referenced in: #1002427 - Accellerating 629 (SPIKE)
#1006654 - Standard functions list 2 (LIVE, continuation of #761)
#3000382 - Answer for ferdie (>> t = 1, f = 0)
#3000383 - Answer for funkoverflow (>> t=1, f=0 okay)