package Ġde . fh do . lemma . model _ processing . code _ generation . spring cloud . handlers . aspect s Ċ Ċ import Ġcom . github . jav ap ar ser . ast . Modifier Ċ import Ġcom . github . jav ap ar ser . ast . Node Ċ import Ġcom . github . jav ap ar ser . ast . body . Class Or Interface Declaration Ċ import Ġde . fh do . lemma . data . intermediate . Intermediate Data Structure Ċ import Ġde . fh do . lemma . data . intermediate . Intermediate Imported Aspect Ċ import Ġde . fh do . lemma . model _ processing . code _ generation . java _ base . ast . Import Target ElementType Ċ import Ġde . fh do . lemma . model _ processing . code _ generation . java _ base . ast . add Dependency Ċ import Ġde . fh do . lemma . model _ processing . code _ generation . java _ base . ast . add Import Ċ import Ġde . fh do . lemma . model _ processing . code _ generation . java _ base . handlers . Aspect Handler Ċ import Ġde . fh do . lemma . model _ processing . code _ generation . java _ base . handlers . Aspect Handler I Ċ import Ġde . fh do . lemma . model _ processing . code _ generation . java _ base . handlers . combin ations Ċ import Ġorg . eclipse . emf . ecore . EObject Ċ Ċ /** Ċ Ġ* ĠHandler Ġfor Ġthe ĠUser Details Ġaspect . Ċ Ġ* Ċ Ġ* Ġ@ author Ġ[ Fl orian ĠR ade m acher ]( mailto : fl orian . r ade m acher @ fh - d ort m und . de ) Ċ Ġ*/ Ċ @ Aspect Handler Ċ internal Ġclass ĠUser Details Handler Ġ: ĠAs pect Handler I Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġhandles Aspect s () Ġ= Ġset Of (" java . UserDetails ", Ġ" Spring . UserDetails ") ĊĠĠĠ Ġoverride Ġfun Ġhandles EObject Node Combin ations () Ġ= Ġcombinations Ġ{ ĊĠĠĠĠĠĠĠ ĠInter mediate Data Structure :: class . java Ġwith ĠClass Or Interface Declaration :: class . java ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠExecution Ġlogic Ġof Ġthe Ġhandler ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġoverride Ġfun Ġexecute ( e Object : ĠE Object , Ġnode : ĠNode , Ġaspect : ĠInter mediate Imported Aspect ) Ġ: ĠNode Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġgenerated Class Ġ= Ġnode Ġas ĠClass Or Interface Declaration ĊĠĠĠĠĠĠĠ Ġgenerated Class . add Dependency (" org . springframework . security : spring - security - core : 5 . 1 . 6 . RELEASE ") ĊĠĠĠĠĠĠĠ Ġgenerated Class . add Import (" org . springframework . security . core . user details . UserDetails ", ĊĠĠĠĠĠĠĠĠĠĠĠ ĠImport Target ElementType . IMPLEMENTED _ INTERFACE ) ĊĠĠĠĠĠĠĠ Ġgenerated Class . add Implemented Type (" UserDetails ") ĊĊĠĠĠĠĠĠĠ Ġgenerated Class . add Over ridden Method IfNot Exists (" get Author ities ", Ġ" Collection <? Ġextends ĠGr anted Authority >", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" java . util . Collection ", Ġ" org . springframework . security . core . Granted Authority ") ĊĠĠĠĠĠĠĠ Ġgenerated Class . add Over ridden Method IfNot Exists (" getPassword ", Ġ" String ") ĊĠĠĠĠĠĠĠ Ġgenerated Class . add Over ridden Method IfNot Exists (" getUsername ", Ġ" String ") ĊĠĠĠĠĠĠĠ Ġgenerated Class . add Over ridden Method IfNot Exists (" is Account Non Expired ", Ġ" boolean ") ĊĠĠĠĠĠĠĠ Ġgenerated Class . add Over ridden Method IfNot Exists (" is Account Non Locked ", Ġ" boolean ") ĊĠĠĠĠĠĠĠ Ġgenerated Class . add Over ridden Method IfNot Exists (" is Credentials Non Expired ", Ġ" boolean ") ĊĠĠĠĠĠĠĠ Ġgenerated Class . add Over ridden Method IfNot Exists (" isEnabled ", Ġ" boolean ") ĊĊĠĠĠĠĠĠĠ Ġreturn Ġnode ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠHelper Ġto Ġadd Ġan Ġoverridden Ġmethod Ġwith Ġthe Ġgiven Ġ[ name ] Ġand Ġreturn Ġ[ type ] Ġto Ġthis Ġ[ Class Or Interface Declaration ] ĊĠĠĠĠ Ġ* Ġif Ġit Ġdoes Ġnot Ġyet Ġexist . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġprivate Ġfun ĠClass Or Interface Declaration . add Over ridden Method IfNot Exists ( name : ĠString , Ġtype : ĠString , ĊĠĠĠĠĠĠĠ Ġvar arg Ġimports : ĠString ) Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ( name Ġin Ġmethods . map Ġ{ Ġit . name AsString Ġ}) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn ĊĊĠĠĠĠĠĠĠ Ġval Ġmethod Ġ= Ġadd Method ( name , ĠModifier . Keyword . PUBLIC ) ĊĠĠĠĠĠĠĠ Ġmethod . setType ( type ) ĊĠĠĠĠĠĠĠ Ġmethod . add Marker Annotation (" Override ") ĊĠĠĠĠĠĠĠ Ġimports . forEach Ġ{ Ġmethod . add Import ( it , ĠImport Target ElementType . METHOD ) Ġ} ĊĠĠĠ Ġ} Ċ }