Skip to content

Commit

Permalink
Issue #4676: move AbstractTypeAwareCheck and ClassResolver to javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
rnveach authored and romani committed Aug 6, 2017
1 parent 6cdae0f commit 16f91dd
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 18 deletions.
Expand Up @@ -17,7 +17,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
////////////////////////////////////////////////////////////////////////////////

package com.puppycrawl.tools.checkstyle.checks;
package com.puppycrawl.tools.checkstyle.checks.javadoc;

import java.util.ArrayDeque;
import java.util.Deque;
Expand Down
Expand Up @@ -17,7 +17,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
////////////////////////////////////////////////////////////////////////////////

package com.puppycrawl.tools.checkstyle.checks;
package com.puppycrawl.tools.checkstyle.checks.javadoc;

import java.util.HashSet;
import java.util.Set;
Expand Down
Expand Up @@ -36,7 +36,6 @@
import com.puppycrawl.tools.checkstyle.api.Scope;
import com.puppycrawl.tools.checkstyle.api.TextBlock;
import com.puppycrawl.tools.checkstyle.api.TokenTypes;
import com.puppycrawl.tools.checkstyle.checks.AbstractTypeAwareCheck;
import com.puppycrawl.tools.checkstyle.utils.CheckUtils;
import com.puppycrawl.tools.checkstyle.utils.CommonUtils;
import com.puppycrawl.tools.checkstyle.utils.ScopeUtils;
Expand Down
Expand Up @@ -35,7 +35,6 @@
import com.puppycrawl.tools.checkstyle.AbstractModuleTestSupport;
import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.checks.AbstractTypeAwareCheck;
import com.puppycrawl.tools.checkstyle.utils.CommonUtils;

@SuppressWarnings("deprecation")
Expand Down Expand Up @@ -64,8 +63,8 @@ public void testIsSubclassWithNulls() throws Exception {

@Test
public void testTokenToString() throws Exception {
final Class<?> tokenType = Class
.forName("com.puppycrawl.tools.checkstyle.checks.AbstractTypeAwareCheck$Token");
final Class<?> tokenType = Class.forName("com.puppycrawl.tools.checkstyle.checks.javadoc."
+ "AbstractTypeAwareCheck$Token");
final Constructor<?> tokenConstructor = tokenType.getDeclaredConstructor(String.class,
int.class, int.class);
final Object token = tokenConstructor.newInstance("blablabla", 1, 1);
Expand All @@ -76,12 +75,12 @@ public void testTokenToString() throws Exception {

@Test
public void testClassRegularClass() throws Exception {
final Class<?> tokenType = Class
.forName("com.puppycrawl.tools.checkstyle.checks.AbstractTypeAwareCheck$Token");
final Class<?> tokenType = Class.forName("com.puppycrawl.tools.checkstyle.checks.javadoc."
+ "AbstractTypeAwareCheck$Token");

final Class<?> regularClassType = Class
.forName(
"com.puppycrawl.tools.checkstyle.checks.AbstractTypeAwareCheck$RegularClass");
.forName("com.puppycrawl.tools.checkstyle.checks.javadoc."
+ "AbstractTypeAwareCheck$RegularClass");
final Constructor<?> regularClassConstructor = regularClassType.getDeclaredConstructor(
tokenType, String.class, AbstractTypeAwareCheck.class);
regularClassConstructor.setAccessible(true);
Expand Down Expand Up @@ -124,12 +123,12 @@ public void testClassRegularClass() throws Exception {

@Test
public void testClassAliasToString() throws Exception {
final Class<?> tokenType = Class
.forName("com.puppycrawl.tools.checkstyle.checks.AbstractTypeAwareCheck$Token");
final Class<?> tokenType = Class.forName("com.puppycrawl.tools.checkstyle.checks.javadoc."
+ "AbstractTypeAwareCheck$Token");

final Class<?> regularClassType = Class
.forName(
"com.puppycrawl.tools.checkstyle.checks.AbstractTypeAwareCheck$RegularClass");
.forName("com.puppycrawl.tools.checkstyle.checks.javadoc."
+ "AbstractTypeAwareCheck$RegularClass");
final Constructor<?> regularClassConstructor = regularClassType.getDeclaredConstructor(
tokenType, String.class, AbstractTypeAwareCheck.class);
regularClassConstructor.setAccessible(true);
Expand All @@ -142,9 +141,10 @@ public void testClassAliasToString() throws Exception {
new JavadocMethodCheck());

final Class<?> classAliasType = Class.forName(
"com.puppycrawl.tools.checkstyle.checks.AbstractTypeAwareCheck$ClassAlias");
final Class<?> abstractTypeInfoType = Class.forName(
"com.puppycrawl.tools.checkstyle.checks.AbstractTypeAwareCheck$AbstractClassInfo");
"com.puppycrawl.tools.checkstyle.checks.javadoc.AbstractTypeAwareCheck$ClassAlias");
final Class<?> abstractTypeInfoType = Class
.forName("com.puppycrawl.tools.checkstyle.checks.javadoc."
+ "AbstractTypeAwareCheck$AbstractClassInfo");

final Constructor<?> classAliasConstructor = classAliasType
.getDeclaredConstructor(tokenType, abstractTypeInfoType);
Expand Down
Expand Up @@ -17,7 +17,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
////////////////////////////////////////////////////////////////////////////////

package com.puppycrawl.tools.checkstyle.checks;
package com.puppycrawl.tools.checkstyle.checks.javadoc;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
Expand Down

0 comments on commit 16f91dd

Please sign in to comment.