|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcheckers.types.AnnotatedTypeFactory
checkers.interned.InternedAnnotatedTypeFactory
public class InternedAnnotatedTypeFactory
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:
1. is a String literal
2. is a class literal
3. has an enum type
4. has a primitive type
5. has the type java.lang.Class
6. is a call to the method String.intern()
Field Summary |
---|
Fields inherited from class checkers.types.AnnotatedTypeFactory |
---|
annotations, atypes, checker, elements, env, qualHierarchy, root, trees, types, visitorState |
Constructor Summary | |
---|---|
InternedAnnotatedTypeFactory(InternedChecker checker,
CompilationUnitTree root)
Creates a new InternedAnnotatedTypeFactory that operates on a
particular AST. |
Method Summary | |
---|---|
protected void |
annotateImplicit(Element elt,
AnnotatedTypeMirror type)
Adds implicit annotations to a type obtained from a Element . |
protected void |
annotateImplicit(Tree tree,
AnnotatedTypeMirror type)
Adds implicit annotations to a type obtained from a Tree . |
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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InternedAnnotatedTypeFactory(InternedChecker checker, CompilationUnitTree root)
InternedAnnotatedTypeFactory
that operates on a
particular AST.
checker
- the checker to useroot
- the AST on which this type factory operatesMethod Detail |
---|
protected void annotateImplicit(Element elt, 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 AnnotatedTypeFactory
elt
- an elementtype
- the type obtained from elt
protected void annotateImplicit(Tree tree, AnnotatedTypeMirror type)
AnnotatedTypeFactory
Tree
. By
default, this method does nothing. Subclasses should use this method to
implement implicit annotations specific to their type systems.
annotateImplicit
in class AnnotatedTypeFactory
tree
- an AST nodetype
- the type obtained from tree
public AnnotatedTypeMirror.AnnotatedPrimitiveType getUnboxedType(AnnotatedTypeMirror.AnnotatedDeclaredType type)
AnnotatedTypeFactory
getUnboxedType
in class AnnotatedTypeFactory
type
- the declared type
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |