reflection - Indentation Checkstyle -
i trying write customized checkstyle check indentation. during process, discovered there codes indentation has been completed checkstyle. however, when copy,paste code, , try run in eclipse environment. unable compile correctly. shows me compilation error such "the method clearcreatedhandlers() type handlerfactory not visible" have no idea how fix error. here source got code
it helpful if else copy,paste codes , try compile , let me know how fix errors. have suffered tons of tries.
thanks in advance.
handlerfactory.clearcreatedhandlers() has default visibility. (the declaration void clearcreatedhandlers() - note absence of public, protected or private.) if working on code in different package, won't able use method.
you'll have work in same package or figure out way accomplish method does.
eta: @hacketo's comment -- use reflection invoke method. (thank you, hacketo.)
Comments
Post a Comment