@ Override public void visitToken ( DetailAST token ) { // Failed to load ServiceClient's class, don't validate anything. if ( this . serviceClientClass == null ) { return ; } switch ( token . getType ( ) ) { case TokenTypes . PACKAGE_DEF : this . extendsServiceClient = extendsServiceClient ( token ) ; break ; case TokenTypes . CTOR_DEF : if ( this . extendsServiceClient && visibilityIsPublicOrProtected ( token ) ) { log ( token , CONSTRUCTOR_ERROR_MESSAGE ) ; } break ; case TokenTypes . METHOD_DEF : if ( this . extendsServiceClient && ! this . hasStaticBuilder && methodIsStaticBuilder ( token ) ) { this . hasStaticBuilder = true ; } break ; } }
Processes a token from the required tokens list when the TreeWalker visits it .