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

19
LINES

< > BotCompany Repo | #1030666 // BEAObject

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (15071L/97K).

1  
concept BEAObject > ConceptWithGlobalID {
2  
  toString {
3  
    S type = type();
4  
    ret nempty(type) ? "[\*id*/] " + type : super.toString();
5  
  }
6  
  
7  
  S type() {
8  
    ret getStringOpt type(this);
9  
  }
10  
  
11  
  S typeFromClassName() {
12  
    if (getClass() == BEAObject) null;
13  
    ret dropPrefixOrNull("B", shortClassName(this));
14  
  }
15  
  
16  
  bool typeIs(S name) {
17  
    ret eqic(type(), name) || eqic(typeFromClassName(), name);
18  
  }
19  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 5 computer(s): bhatertpkbcr, ekrmjmnbrukm, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030666
Snippet name: BEAObject
Eternal ID of this version: #1030666/7
Text MD5: ddc561f5dc75ee1da9cf470e4d906203
Transpilation MD5: 31f9833d840087537b80f7022f71e221
Author: stefan
Category: javax / Gazelle BEA
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-03-19 16:20:16
Source code size: 433 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 178 / 381
Version history: 6 change(s)
Referenced in: [show references]