Class FinalClassCheck.ClassDesc
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.checks.design.FinalClassCheck.TypeDeclarationDescription
-
- com.puppycrawl.tools.checkstyle.checks.design.FinalClassCheck.ClassDesc
-
- Enclosing class:
- FinalClassCheck
private static final class FinalClassCheck.ClassDesc extends FinalClassCheck.TypeDeclarationDescription
Maintains information about the class.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
declaredAsAbstract
Is class declared as abstract.private boolean
declaredAsFinal
Is class declared as final.private boolean
declaredAsPrivate
Is class contains private modifier.private boolean
hasDeclaredConstructor
Does class have implicit constructor.private boolean
superClassOfAnonymousInnerClass
Whether the class is the super class of an anonymous inner class.private boolean
withNestedSubclass
Does class have nested subclass.private boolean
withNonPrivateCtor
Does class have non-private ctors.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
isDeclaredAsAbstract()
Is class declared as abstract.private boolean
isDeclaredAsFinal()
Is class declared as final.private boolean
isDeclaredAsPrivate()
Does class is private.private boolean
isHasDeclaredConstructor()
Does class have implicit constructor.private boolean
isSuperClassOfAnonymousInnerClass()
Whether the class is the super class of an anonymous inner class.private boolean
isWithNestedSubclass()
Does class have nested subclass.private boolean
isWithNonPrivateCtor()
Does class have non-private ctors.private void
registerNestedSubclass()
Adds nested subclass.private void
registerNonPrivateCtor()
Adds non-private ctor.private void
registerSuperClassOfAnonymousInnerClass()
Adds anonymous inner class.-
Methods inherited from class com.puppycrawl.tools.checkstyle.checks.design.FinalClassCheck.TypeDeclarationDescription
getDepth, getQualifiedName, getTypeDeclarationAst
-
-
-
-
Field Detail
-
declaredAsFinal
private final boolean declaredAsFinal
Is class declared as final.
-
declaredAsAbstract
private final boolean declaredAsAbstract
Is class declared as abstract.
-
declaredAsPrivate
private final boolean declaredAsPrivate
Is class contains private modifier.
-
hasDeclaredConstructor
private final boolean hasDeclaredConstructor
Does class have implicit constructor.
-
withNonPrivateCtor
private boolean withNonPrivateCtor
Does class have non-private ctors.
-
withNestedSubclass
private boolean withNestedSubclass
Does class have nested subclass.
-
superClassOfAnonymousInnerClass
private boolean superClassOfAnonymousInnerClass
Whether the class is the super class of an anonymous inner class.
-
-
Method Detail
-
registerNonPrivateCtor
private void registerNonPrivateCtor()
Adds non-private ctor.
-
registerNestedSubclass
private void registerNestedSubclass()
Adds nested subclass.
-
registerSuperClassOfAnonymousInnerClass
private void registerSuperClassOfAnonymousInnerClass()
Adds anonymous inner class.
-
isWithNonPrivateCtor
private boolean isWithNonPrivateCtor()
Does class have non-private ctors.- Returns:
- true if class has non-private ctors
-
isWithNestedSubclass
private boolean isWithNestedSubclass()
Does class have nested subclass.- Returns:
- true if class has nested subclass
-
isDeclaredAsFinal
private boolean isDeclaredAsFinal()
Is class declared as final.- Returns:
- true if class is declared as final
-
isDeclaredAsAbstract
private boolean isDeclaredAsAbstract()
Is class declared as abstract.- Returns:
- true if class is declared as final
-
isSuperClassOfAnonymousInnerClass
private boolean isSuperClassOfAnonymousInnerClass()
Whether the class is the super class of an anonymous inner class.- Returns:
true
if the class is the super class of an anonymous inner class.
-
isHasDeclaredConstructor
private boolean isHasDeclaredConstructor()
Does class have implicit constructor.- Returns:
- true if class have implicit constructor
-
isDeclaredAsPrivate
private boolean isDeclaredAsPrivate()
Does class is private.- Returns:
- true if class is private
-
-