X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Finspector%2Fjava%2Fmethods%2FAnnotation.java;h=94b320c3218926d7d301647b613a6b1aa8f5514c;hb=d6b9aa36eec691e17ad10eaa814308b50e44255a;hp=da600619ec6930074e4679b381b004b61a35ce17;hpb=9d9b65fb1909e12606e76ed0625706e446f588fb;p=javainspect.git diff --git a/src/main/java/eu/svjatoslav/inspector/java/methods/Annotation.java b/src/main/java/eu/svjatoslav/inspector/java/methods/Annotation.java index da60061..94b320c 100755 --- a/src/main/java/eu/svjatoslav/inspector/java/methods/Annotation.java +++ b/src/main/java/eu/svjatoslav/inspector/java/methods/Annotation.java @@ -1,6 +1,6 @@ /* * JavaInspect - Utility to visualize java software - * Copyright (C) 2013-2015, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu + * Copyright (C) 2013-2017, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu * * This program is free software; you can redistribute it and/or * modify it under the terms of version 3 of the GNU Lesser General Public License @@ -15,32 +15,32 @@ import eu.svjatoslav.commons.string.tokenizer.TokenizerMatch; public class Annotation { - private String name; + private String name; - public Annotation(final Tokenizer tokenizer) throws InvalidSyntaxException { + public Annotation(final Tokenizer tokenizer) throws InvalidSyntaxException { - name = tokenizer.getNextToken().token; + name = tokenizer.getNextToken().token; - if (!tokenizer.probeNextToken("(")) - return; + if (!tokenizer.consumeIfNextToken("(")) + return; - int depth = 1; + int depth = 1; - while (true) { - final TokenizerMatch token = tokenizer.getNextToken(); + while (true) { + final TokenizerMatch token = tokenizer.getNextToken(); - if (token == null) - return; + if (token == null) + return; - if ("(".equals(token.token)) - depth++; - if (")".equals(token.token)) - depth--; + if ("(".equals(token.token)) + depth++; + if (")".equals(token.token)) + depth--; - if (depth == 0) - return; - } + if (depth == 0) + return; + } - } + } }