Class SyntheticLocalVariableElement
java.lang.Object
org.microbean.construct.element.SyntheticLocalVariableElement
- All Implemented Interfaces:
AnnotatedConstruct, Element, VariableElement
An experimental
VariableElement implementation that is a synthetic representation of a local
variable.
SyntheticLocalVariableElement instances may be useful for capturing declaration annotations that really
pertain to type usage. Such scenarios are often found in dependency injection systems.
- Author:
- Laird Nelson
-
Constructor Summary
ConstructorsConstructorDescriptionSyntheticLocalVariableElement(Collection<? extends AnnotationMirror> as, TypeMirror type) Creates a newSyntheticLocalVariableElement.SyntheticLocalVariableElement(Collection<? extends AnnotationMirror> as, TypeMirror type, String name) Creates a newSyntheticLocalVariableElement.Creates a newSyntheticLocalVariableElement.SyntheticLocalVariableElement(TypeMirror type, String name) Creates a newSyntheticLocalVariableElement. -
Method Summary
Modifier and TypeMethodDescriptionfinal <R,P> R accept(ElementVisitor<R, P> v, P p) final TypeMirrorasType()final booleanfinal <A extends Annotation>
AgetAnnotation(Class<A> annotationType) Deprecated.final List<AnnotationMirror> final <A extends Annotation>
A[]getAnnotationsByType(Class<A> annotationType) Deprecated.final Objectfinal Elementfinal ElementKindgetKind()final Namefinal inthashCode()Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface VariableElement
isUnnamed
-
Constructor Details
-
SyntheticLocalVariableElement
Creates a newSyntheticLocalVariableElement.- Parameters:
type- a non-nullTypeMirrorthat a hypothetical local variable may bear; as of this writing no validation is performed on any argument supplied for this parameter- Throws:
NullPointerException- iftypeisnull- See Also:
-
SyntheticLocalVariableElement
Creates a newSyntheticLocalVariableElement.- Parameters:
type- a non-nullTypeMirrorthat a hypothetical local variable may bear; as of this writing no validation is performed on any argument supplied for this parametername- the name of thisSyntheticLocalVariableElement; may benull- Throws:
NullPointerException- iftypeisnull- See Also:
-
SyntheticLocalVariableElement
Creates a newSyntheticLocalVariableElement.- Parameters:
as- a non-nullCollectionofAnnotationMirrorstype- a non-nullTypeMirrorthat a hypothetical local variable may bear; as of this writing no validation is performed on any argument supplied for this parameter- Throws:
NullPointerException- ifasortypeisnull- See Also:
-
SyntheticLocalVariableElement
public SyntheticLocalVariableElement(Collection<? extends AnnotationMirror> as, TypeMirror type, String name) Creates a newSyntheticLocalVariableElement.- Parameters:
as- a non-nullCollectionofAnnotationMirrorstype- a non-nullTypeMirrorthat a hypothetical local variable may bear; as of this writing no validation is performed on any argument supplied for this parametername- the name of thisSyntheticLocalVariableElement; may benull- Throws:
NullPointerException- ifasortypeisnull
-
-
Method Details
-
accept
-
asType
- Specified by:
asTypein interfaceElement- Specified by:
asTypein interfaceVariableElement
-
equals
-
getAnnotationMirrors
- Specified by:
getAnnotationMirrorsin interfaceAnnotatedConstruct- Specified by:
getAnnotationMirrorsin interfaceElement
-
getAnnotation
Deprecated.- Specified by:
getAnnotationin interfaceAnnotatedConstruct- Specified by:
getAnnotationin interfaceElement
-
getAnnotationsByType
Deprecated.- Specified by:
getAnnotationsByTypein interfaceAnnotatedConstruct- Specified by:
getAnnotationsByTypein interfaceElement
-
getConstantValue
- Specified by:
getConstantValuein interfaceVariableElement
-
getEnclosedElements
- Specified by:
getEnclosedElementsin interfaceElement
-
getEnclosingElement
- Specified by:
getEnclosingElementin interfaceElement- Specified by:
getEnclosingElementin interfaceVariableElement
-
getKind
-
getModifiers
- Specified by:
getModifiersin interfaceElement
-
getSimpleName
- Specified by:
getSimpleNamein interfaceElement- Specified by:
getSimpleNamein interfaceVariableElement
-
hashCode
-