Class JavaTypeAccess
- java.lang.Object
-
- com.hello2morrow.sonargraph.core.api.model.ElementAccess<com.hello2morrow.sonargraph.core.model.programming.ProgrammingElement>
-
- com.hello2morrow.sonargraph.core.api.model.ProgrammingElementAccess
-
- com.hello2morrow.sonargraph.core.api.model.TypeAccess
-
- com.hello2morrow.sonargraph.languageprovider.java.api.model.JavaTypeAccess
-
- All Implemented Interfaces:
IJavaTypeAccess
,IElementAccess
,INamedElementAccess
,IProgrammingElementAccess
,ITypeAccess
public final class JavaTypeAccess extends TypeAccess implements IJavaTypeAccess
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.hello2morrow.sonargraph.core.api.model.ElementAccess
ElementAccess.IAccessFactory
-
Nested classes/interfaces inherited from interface com.hello2morrow.sonargraph.api.java.IJavaTypeAccess
IJavaTypeAccess.IVisitor
-
Nested classes/interfaces inherited from interface com.hello2morrow.sonargraph.api.model.INamedElementAccess
INamedElementAccess.INamedElementAccessVisitor
-
Nested classes/interfaces inherited from interface com.hello2morrow.sonargraph.api.model.IProgrammingElementAccess
IProgrammingElementAccess.IVisitor
-
Nested classes/interfaces inherited from interface com.hello2morrow.sonargraph.api.model.ITypeAccess
ITypeAccess.IVisitor
-
-
Constructor Summary
Constructors Constructor Description JavaTypeAccess(com.hello2morrow.sonargraph.languageprovider.java.model.programming.JavaType type)
Internal use only
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(INamedElementAccess.INamedElementAccessVisitor visitor)
Internaljava.util.List<IAnnotationAccess>
getAnnotations()
java.lang.Float
getClassMemberVisibilityMetric()
java.util.List<IJavaFieldAccess>
getFields()
java.util.List<IJavaMethodAccess>
getMethods()
Get a list of all methods in this type.boolean
isAbstract()
boolean
isAnnotation()
boolean
isDeprecated()
boolean
isEnum()
boolean
isFinal()
boolean
isGeneric()
boolean
isInner()
boolean
isNested()
boolean
isPackagePrivate()
boolean
isPrivate()
boolean
isProtected()
boolean
isPublic()
boolean
isStatic()
boolean
isTopLevel()
-
Methods inherited from class com.hello2morrow.sonargraph.core.api.model.TypeAccess
getAverageComplexityMetric, getAverageNestingMetric, getLCOM4Metric, getMaxNestingMetric, getMetricLevel, getNumberOfStatementsMetric, getSourceElementCountMetric, isAnonymous, isClass, isInterface, typeOf
-
Methods inherited from class com.hello2morrow.sonargraph.core.api.model.ProgrammingElementAccess
getDirectory, getIncomingDependencies, getIncomingDependencies, getIncomingDependenciesRecursively, getIncomingDependenciesRecursively, getLineNumber, getModule, getModuleNamespace, getOutgoingDependencies, getOutgoingDependencies, getOutgoingDependencies, getOutgoingDependenciesRecursively, getOutgoingDependenciesRecursively, getOutgoingDependenciesRecursively, getReferencedElements, getReferencedElements, getReferencedElements, getReferencedElementsRecursively, getReferencedElementsRecursively, getReferencedElementsRecursively, getReferencingElements, getReferencingElements, getReferencingElementsRecursively, getReferencingElementsRecursively, getRootDirectory, getSourceFile, getSystemNamespace, isDefinedInEnclosingElement
-
Methods inherited from class com.hello2morrow.sonargraph.core.api.model.ElementAccess
equals, getChildren, getElement, getFullyQualifiedName, getIssueCount, getName, getNameWithSignature, getParent, getParent, getShortName, getShortNameWithSignature, hashCode, ignoreIssues, isExcluded, isExternal, setFactory, toString
-
Methods inherited from interface com.hello2morrow.sonargraph.api.model.IElementAccess
getName, getNameWithSignature, getShortName, getShortNameWithSignature, ignoreIssues, isExcluded, isExternal
-
Methods inherited from interface com.hello2morrow.sonargraph.api.model.INamedElementAccess
getChildren, getFullyQualifiedName, getIncomingDependenciesRecursively, getIncomingDependenciesRecursively, getIssueCount, getIssueCount, getOutgoingDependenciesRecursively, getOutgoingDependenciesRecursively, getOutgoingDependenciesRecursively, getParent, getParent, getReferencedElementsRecursively, getReferencedElementsRecursively, getReferencedElementsRecursively, getReferencingElementsRecursively, getReferencingElementsRecursively
-
Methods inherited from interface com.hello2morrow.sonargraph.api.model.IProgrammingElementAccess
getDirectory, getIncomingDependencies, getIncomingDependencies, getLineNumber, getModule, getModuleNamespace, getOutgoingDependencies, getOutgoingDependencies, getOutgoingDependencies, getReferencedElements, getReferencedElements, getReferencedElements, getReferencingElements, getReferencingElements, getRootDirectory, getSourceFile, getSystemNamespace, isDefinedInEnclosingElement
-
Methods inherited from interface com.hello2morrow.sonargraph.api.model.ITypeAccess
getAverageComplexityMetric, getAverageNestingMetric, getLCOM4Metric, getMaxNestingMetric, getNumberOfStatementsMetric, getSourceElementCountMetric, isAnonymous, isClass, isInterface, typeOf
-
-
-
-
Method Detail
-
isAnnotation
public final boolean isAnnotation()
- Specified by:
isAnnotation
in interfaceIJavaTypeAccess
-
isEnum
public final boolean isEnum()
- Specified by:
isEnum
in interfaceIJavaTypeAccess
-
isStatic
public final boolean isStatic()
- Specified by:
isStatic
in interfaceIJavaTypeAccess
-
isFinal
public final boolean isFinal()
- Specified by:
isFinal
in interfaceIJavaTypeAccess
-
isAbstract
public final boolean isAbstract()
- Specified by:
isAbstract
in interfaceIJavaTypeAccess
- Specified by:
isAbstract
in interfaceITypeAccess
- Overrides:
isAbstract
in classTypeAccess
- Returns:
- true, if this is an abstract type.
-
isNested
public boolean isNested()
- Specified by:
isNested
in interfaceIJavaTypeAccess
- Specified by:
isNested
in interfaceITypeAccess
- Overrides:
isNested
in classTypeAccess
- Returns:
- true, if this is a nested type.
-
isInner
public boolean isInner()
- Specified by:
isInner
in interfaceIJavaTypeAccess
-
isTopLevel
public boolean isTopLevel()
- Specified by:
isTopLevel
in interfaceIJavaTypeAccess
-
isGeneric
public boolean isGeneric()
- Specified by:
isGeneric
in interfaceIJavaTypeAccess
-
isPublic
public final boolean isPublic()
- Specified by:
isPublic
in interfaceIJavaTypeAccess
-
isPrivate
public final boolean isPrivate()
- Specified by:
isPrivate
in interfaceIJavaTypeAccess
-
isProtected
public final boolean isProtected()
- Specified by:
isProtected
in interfaceIJavaTypeAccess
-
isPackagePrivate
public final boolean isPackagePrivate()
- Specified by:
isPackagePrivate
in interfaceIJavaTypeAccess
-
isDeprecated
public final boolean isDeprecated()
- Specified by:
isDeprecated
in interfaceIJavaTypeAccess
-
getClassMemberVisibilityMetric
public java.lang.Float getClassMemberVisibilityMetric()
- Specified by:
getClassMemberVisibilityMetric
in interfaceIJavaTypeAccess
-
getAnnotations
public java.util.List<IAnnotationAccess> getAnnotations()
- Specified by:
getAnnotations
in interfaceIJavaTypeAccess
-
getMethods
public java.util.List<IJavaMethodAccess> getMethods()
Description copied from class:TypeAccess
Get a list of all methods in this type.- Specified by:
getMethods
in interfaceIJavaTypeAccess
- Specified by:
getMethods
in interfaceITypeAccess
- Overrides:
getMethods
in classTypeAccess
- Returns:
- see above
-
getFields
public java.util.List<IJavaFieldAccess> getFields()
- Specified by:
getFields
in interfaceIJavaTypeAccess
- Specified by:
getFields
in interfaceITypeAccess
- Overrides:
getFields
in classTypeAccess
- Returns:
- a list of all fields in this type.
-
accept
public void accept(INamedElementAccess.INamedElementAccessVisitor visitor)
Internal- Specified by:
accept
in interfaceINamedElementAccess
- Overrides:
accept
in classTypeAccess
- Parameters:
visitor
- The visitor implementation
-
-