|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object checkers.types.AnnotatedTypeFactory checkers.types.BasicAnnotatedTypeFactory<InterningChecker> checkers.interning.InterningAnnotatedTypeFactory
public class InterningAnnotatedTypeFactory extends BasicAnnotatedTypeFactory<InterningChecker>
An AnnotatedTypeFactory
that accounts for the properties of the
Interned type system. This type factory will add the Interned
annotation to a type if the input:
BasicAnnotatedTypeFactory
and inherits its
functionality, including: flow-sensitive qualifier inference, qualifier
polymorphism (of PolyInterned
), implicit annotations via
ImplicitFor
on Interned
(to handle cases 1, 2, 4), and
user-specified defaults via DefaultQualifier
.
Case 5 is handled by the stub library.
Modifier and Type | Class and Description |
---|
Nested classes/interfaces inherited from class checkers.types.AnnotatedTypeFactory |
---|
AnnotatedTypeFactory.InheritedFromClassAnnotator |
Modifier and Type | Field and Description |
---|
Fields inherited from class checkers.types.BasicAnnotatedTypeFactory |
---|
defaults, flow, FLOW_BY_DEFAULT, poly, treeAnnotator, typeAnnotator, useFlow |
Fields inherited from class checkers.types.AnnotatedTypeFactory |
---|
annotations, atypes, elements, env, fromTreeCache, qualHierarchy, root, trees, types, visitorState |
Constructor and Description |
---|
InterningAnnotatedTypeFactory(InterningChecker checker,
CompilationUnitTree root)
Creates a new InterningAnnotatedTypeFactory that operates on a
particular AST. |
Modifier and Type | Method and Description |
---|---|
protected void |
annotateImplicit(Element element,
AnnotatedTypeMirror type)
Adds implicit annotations to a type obtained from a Element . |
protected void |
annotateInheritedFromClass(AnnotatedTypeMirror type)
Adds annotations to the type based on the annotations from its class type if and only if no annotations are already present on the type. |
protected TreeAnnotator |
createTreeAnnotator(InterningChecker checker)
Returns a TreeAnnotator that adds annotations to a type based
on the contents of a tree. |
protected TypeAnnotator |
createTypeAnnotator(InterningChecker checker)
Returns a TypeAnnotator that adds annotations to a type based
on the content of the type itself. |
AnnotatedTypeMirror.AnnotatedPrimitiveType |
getUnboxedType(AnnotatedTypeMirror.AnnotatedDeclaredType type)
returns the annotated primitive type of the given declared type if it is a boxed declared type. |
Methods inherited from class checkers.types.BasicAnnotatedTypeFactory |
---|
annotateImplicit, createFlow, createFlowQualifiers, methodFromUse, postDirectSuperTypes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InterningAnnotatedTypeFactory(InterningChecker checker, CompilationUnitTree root)
InterningAnnotatedTypeFactory
that operates on a
particular AST.
checker
- the checker to useroot
- the AST on which this type factory operatesMethod Detail |
---|
protected TreeAnnotator createTreeAnnotator(InterningChecker checker)
BasicAnnotatedTypeFactory
TreeAnnotator
that adds annotations to a type based
on the contents of a tree.
Subclasses may override this method to specify more appriopriate
TreeAnnotator
createTreeAnnotator
in class BasicAnnotatedTypeFactory<InterningChecker>
protected TypeAnnotator createTypeAnnotator(InterningChecker checker)
BasicAnnotatedTypeFactory
TypeAnnotator
that adds annotations to a type based
on the content of the type itself.
createTypeAnnotator
in class BasicAnnotatedTypeFactory<InterningChecker>
protected void annotateImplicit(Element element, AnnotatedTypeMirror type)
AnnotatedTypeFactory
Element
. By
default, this method does nothing. Subclasses should use this method to
implement implicit annotations specific to their type systems.
annotateImplicit
in class BasicAnnotatedTypeFactory<InterningChecker>
element
- an elementtype
- the type obtained from elt
public AnnotatedTypeMirror.AnnotatedPrimitiveType getUnboxedType(AnnotatedTypeMirror.AnnotatedDeclaredType type)
AnnotatedTypeFactory
getUnboxedType
in class AnnotatedTypeFactory
type
- the declared typeprotected void annotateInheritedFromClass(@Mutable AnnotatedTypeMirror type)
AnnotatedTypeFactory
annotateInheritedFromClass
in class AnnotatedTypeFactory
type
- the type for which class annotations will be inherited if
there are no annotations already present
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |