Index
All Classes and Interfaces|All Packages|Constant Field Values
A
- add(CodeBlock) - Method in class com.squareup.javapoet.CodeBlock.Builder
- add(String, Object...) - Method in class com.squareup.javapoet.CodeBlock.Builder
- addAnnotation(AnnotationSpec) - Method in class com.squareup.javapoet.FieldSpec.Builder
- addAnnotation(AnnotationSpec) - Method in class com.squareup.javapoet.MethodSpec.Builder
- addAnnotation(AnnotationSpec) - Method in class com.squareup.javapoet.ParameterSpec.Builder
- addAnnotation(AnnotationSpec) - Method in class com.squareup.javapoet.TypeSpec.Builder
- addAnnotation(ClassName) - Method in class com.squareup.javapoet.FieldSpec.Builder
- addAnnotation(ClassName) - Method in class com.squareup.javapoet.MethodSpec.Builder
- addAnnotation(ClassName) - Method in class com.squareup.javapoet.ParameterSpec.Builder
- addAnnotation(ClassName) - Method in class com.squareup.javapoet.TypeSpec.Builder
- addAnnotation(Class<?>) - Method in class com.squareup.javapoet.FieldSpec.Builder
- addAnnotation(Class<?>) - Method in class com.squareup.javapoet.MethodSpec.Builder
- addAnnotation(Class<?>) - Method in class com.squareup.javapoet.ParameterSpec.Builder
- addAnnotation(Class<?>) - Method in class com.squareup.javapoet.TypeSpec.Builder
- addAnnotations(Iterable<AnnotationSpec>) - Method in class com.squareup.javapoet.FieldSpec.Builder
- addAnnotations(Iterable<AnnotationSpec>) - Method in class com.squareup.javapoet.MethodSpec.Builder
- addAnnotations(Iterable<AnnotationSpec>) - Method in class com.squareup.javapoet.ParameterSpec.Builder
- addAnnotations(Iterable<AnnotationSpec>) - Method in class com.squareup.javapoet.TypeSpec.Builder
- addCode(CodeBlock) - Method in class com.squareup.javapoet.MethodSpec.Builder
- addCode(String, Object...) - Method in class com.squareup.javapoet.MethodSpec.Builder
- addEnumConstant(String) - Method in class com.squareup.javapoet.TypeSpec.Builder
- addEnumConstant(String, TypeSpec) - Method in class com.squareup.javapoet.TypeSpec.Builder
- addException(TypeName) - Method in class com.squareup.javapoet.MethodSpec.Builder
- addException(Type) - Method in class com.squareup.javapoet.MethodSpec.Builder
- addExceptions(Iterable<? extends TypeName>) - Method in class com.squareup.javapoet.MethodSpec.Builder
- addField(FieldSpec) - Method in class com.squareup.javapoet.TypeSpec.Builder
- addField(TypeName, String, Modifier...) - Method in class com.squareup.javapoet.TypeSpec.Builder
- addField(Type, String, Modifier...) - Method in class com.squareup.javapoet.TypeSpec.Builder
- addFields(Iterable<FieldSpec>) - Method in class com.squareup.javapoet.TypeSpec.Builder
- addFileComment(String, Object...) - Method in class com.squareup.javapoet.JavaFile.Builder
- addInitializerBlock(CodeBlock) - Method in class com.squareup.javapoet.TypeSpec.Builder
- addJavadoc(String, Object...) - Method in class com.squareup.javapoet.FieldSpec.Builder
- addJavadoc(String, Object...) - Method in class com.squareup.javapoet.MethodSpec.Builder
- addJavadoc(String, Object...) - Method in class com.squareup.javapoet.TypeSpec.Builder
- addMember(String, CodeBlock) - Method in class com.squareup.javapoet.AnnotationSpec.Builder
- addMember(String, String, Object...) - Method in class com.squareup.javapoet.AnnotationSpec.Builder
- addMemberForValue(String, Object) - Method in class com.squareup.javapoet.AnnotationSpec.Builder
-
Delegates to
AnnotationSpec.Builder.addMember(String, String, Object...)
, with parameterformat
depending on the givenvalue
object. - addMethod(MethodSpec) - Method in class com.squareup.javapoet.TypeSpec.Builder
- addMethods(Iterable<MethodSpec>) - Method in class com.squareup.javapoet.TypeSpec.Builder
- addModifiers(Iterable<Modifier>) - Method in class com.squareup.javapoet.MethodSpec.Builder
- addModifiers(Modifier...) - Method in class com.squareup.javapoet.FieldSpec.Builder
- addModifiers(Modifier...) - Method in class com.squareup.javapoet.MethodSpec.Builder
- addModifiers(Modifier...) - Method in class com.squareup.javapoet.ParameterSpec.Builder
- addModifiers(Modifier...) - Method in class com.squareup.javapoet.TypeSpec.Builder
- addOriginatingElement(Element) - Method in class com.squareup.javapoet.TypeSpec.Builder
- addParameter(ParameterSpec) - Method in class com.squareup.javapoet.MethodSpec.Builder
- addParameter(TypeName, String, Modifier...) - Method in class com.squareup.javapoet.MethodSpec.Builder
- addParameter(Type, String, Modifier...) - Method in class com.squareup.javapoet.MethodSpec.Builder
- addParameters(Iterable<ParameterSpec>) - Method in class com.squareup.javapoet.MethodSpec.Builder
- addStatement(String, Object...) - Method in class com.squareup.javapoet.CodeBlock.Builder
- addStatement(String, Object...) - Method in class com.squareup.javapoet.MethodSpec.Builder
- addStaticBlock(CodeBlock) - Method in class com.squareup.javapoet.TypeSpec.Builder
- addStaticImport(ClassName, String...) - Method in class com.squareup.javapoet.JavaFile.Builder
- addStaticImport(Class<?>, String...) - Method in class com.squareup.javapoet.JavaFile.Builder
- addStaticImport(Enum<?>) - Method in class com.squareup.javapoet.JavaFile.Builder
- addSuperinterface(TypeName) - Method in class com.squareup.javapoet.TypeSpec.Builder
- addSuperinterface(Type) - Method in class com.squareup.javapoet.TypeSpec.Builder
- addSuperinterfaces(Iterable<? extends TypeName>) - Method in class com.squareup.javapoet.TypeSpec.Builder
- addType(TypeSpec) - Method in class com.squareup.javapoet.TypeSpec.Builder
- addTypes(Iterable<TypeSpec>) - Method in class com.squareup.javapoet.TypeSpec.Builder
- addTypeVariable(TypeVariableName) - Method in class com.squareup.javapoet.MethodSpec.Builder
- addTypeVariable(TypeVariableName) - Method in class com.squareup.javapoet.TypeSpec.Builder
- addTypeVariables(Iterable<TypeVariableName>) - Method in class com.squareup.javapoet.MethodSpec.Builder
- addTypeVariables(Iterable<TypeVariableName>) - Method in class com.squareup.javapoet.TypeSpec.Builder
- allocatedNames - Variable in class com.squareup.javapoet.NameAllocator
- annotated(AnnotationSpec...) - Method in class com.squareup.javapoet.TypeName
- annotated(List<AnnotationSpec>) - Method in class com.squareup.javapoet.ArrayTypeName
- annotated(List<AnnotationSpec>) - Method in class com.squareup.javapoet.ClassName
- annotated(List<AnnotationSpec>) - Method in class com.squareup.javapoet.ParameterizedTypeName
- annotated(List<AnnotationSpec>) - Method in class com.squareup.javapoet.TypeName
- annotated(List<AnnotationSpec>) - Method in class com.squareup.javapoet.TypeVariableName
- annotated(List<AnnotationSpec>) - Method in class com.squareup.javapoet.WildcardTypeName
- ANNOTATION - Enum constant in enum class com.squareup.javapoet.TypeSpec.Kind
- annotationBuilder(ClassName) - Static method in class com.squareup.javapoet.TypeSpec
- annotationBuilder(String) - Static method in class com.squareup.javapoet.TypeSpec
- annotations - Variable in class com.squareup.javapoet.FieldSpec
- annotations - Variable in class com.squareup.javapoet.FieldSpec.Builder
- annotations - Variable in class com.squareup.javapoet.MethodSpec
- annotations - Variable in class com.squareup.javapoet.MethodSpec.Builder
- annotations - Variable in class com.squareup.javapoet.ParameterSpec
- annotations - Variable in class com.squareup.javapoet.ParameterSpec.Builder
- annotations - Variable in class com.squareup.javapoet.TypeName
- annotations - Variable in class com.squareup.javapoet.TypeSpec
- annotations - Variable in class com.squareup.javapoet.TypeSpec.Builder
- AnnotationSpec - Class in com.squareup.javapoet
-
A generated annotation on a declaration.
- AnnotationSpec(AnnotationSpec.Builder) - Constructor for class com.squareup.javapoet.AnnotationSpec
- AnnotationSpec.Builder - Class in com.squareup.javapoet
- AnnotationSpec.Visitor - Class in com.squareup.javapoet
-
Annotation value visitor adding members to the given builder instance.
- anonymousClassBuilder(String, Object...) - Static method in class com.squareup.javapoet.TypeSpec
- anonymousTypeArguments - Variable in class com.squareup.javapoet.TypeSpec
- anonymousTypeArguments - Variable in class com.squareup.javapoet.TypeSpec.Builder
- args - Variable in class com.squareup.javapoet.CodeBlock
- args - Variable in class com.squareup.javapoet.CodeBlock.Builder
- argToLiteral(Object) - Method in class com.squareup.javapoet.CodeBlock.Builder
- argToName(Object) - Method in class com.squareup.javapoet.CodeBlock.Builder
- argToString(Object) - Method in class com.squareup.javapoet.CodeBlock.Builder
- argToType(Object) - Method in class com.squareup.javapoet.CodeBlock.Builder
- arrayComponent(TypeName) - Static method in class com.squareup.javapoet.TypeName
-
Returns the array component of
type
, or null iftype
is not an array. - ArrayTypeName - Class in com.squareup.javapoet
- ArrayTypeName(TypeName) - Constructor for class com.squareup.javapoet.ArrayTypeName
- ArrayTypeName(TypeName, List<AnnotationSpec>) - Constructor for class com.squareup.javapoet.ArrayTypeName
- asMemberModifiers - Variable in enum class com.squareup.javapoet.TypeSpec.Kind
B
- beginControlFlow(String, Object...) - Method in class com.squareup.javapoet.CodeBlock.Builder
- beginControlFlow(String, Object...) - Method in class com.squareup.javapoet.MethodSpec.Builder
- bestGuess(String) - Static method in class com.squareup.javapoet.ClassName
-
Returns a new
ClassName
instance for the given fully-qualified class name string. - BOOLEAN - Static variable in class com.squareup.javapoet.TypeName
- bounds - Variable in class com.squareup.javapoet.TypeVariableName
- box() - Method in class com.squareup.javapoet.TypeName
-
Returns a boxed type if this is a primitive type (like
Integer
forint
) orvoid
. - BOXED_BOOLEAN - Static variable in class com.squareup.javapoet.TypeName
- BOXED_BYTE - Static variable in class com.squareup.javapoet.TypeName
- BOXED_CHAR - Static variable in class com.squareup.javapoet.TypeName
- BOXED_DOUBLE - Static variable in class com.squareup.javapoet.TypeName
- BOXED_FLOAT - Static variable in class com.squareup.javapoet.TypeName
- BOXED_INT - Static variable in class com.squareup.javapoet.TypeName
- BOXED_LONG - Static variable in class com.squareup.javapoet.TypeName
- BOXED_SHORT - Static variable in class com.squareup.javapoet.TypeName
- BOXED_VOID - Static variable in class com.squareup.javapoet.TypeName
- build() - Method in class com.squareup.javapoet.AnnotationSpec.Builder
- build() - Method in class com.squareup.javapoet.CodeBlock.Builder
- build() - Method in class com.squareup.javapoet.FieldSpec.Builder
- build() - Method in class com.squareup.javapoet.JavaFile.Builder
- build() - Method in class com.squareup.javapoet.MethodSpec.Builder
- build() - Method in class com.squareup.javapoet.ParameterSpec.Builder
- build() - Method in class com.squareup.javapoet.TypeSpec.Builder
- builder - Variable in class com.squareup.javapoet.AnnotationSpec.Visitor
- builder() - Static method in class com.squareup.javapoet.CodeBlock
- builder(ClassName) - Static method in class com.squareup.javapoet.AnnotationSpec
- builder(TypeName, String, Modifier...) - Static method in class com.squareup.javapoet.FieldSpec
- builder(TypeName, String, Modifier...) - Static method in class com.squareup.javapoet.ParameterSpec
- builder(Class<?>) - Static method in class com.squareup.javapoet.AnnotationSpec
- builder(Type, String, Modifier...) - Static method in class com.squareup.javapoet.FieldSpec
- builder(Type, String, Modifier...) - Static method in class com.squareup.javapoet.ParameterSpec
- builder(String, TypeSpec) - Static method in class com.squareup.javapoet.JavaFile
- Builder() - Constructor for class com.squareup.javapoet.CodeBlock.Builder
- Builder(TypeName) - Constructor for class com.squareup.javapoet.AnnotationSpec.Builder
- Builder(TypeName, String) - Constructor for class com.squareup.javapoet.FieldSpec.Builder
- Builder(TypeName, String) - Constructor for class com.squareup.javapoet.ParameterSpec.Builder
- Builder(TypeSpec.Kind, String, CodeBlock) - Constructor for class com.squareup.javapoet.TypeSpec.Builder
- Builder(String) - Constructor for class com.squareup.javapoet.MethodSpec.Builder
- Builder(String, TypeSpec) - Constructor for class com.squareup.javapoet.JavaFile.Builder
- BYTE - Static variable in class com.squareup.javapoet.TypeName
C
- cachedString - Variable in class com.squareup.javapoet.TypeName
-
Lazily-initialized toString of this type name.
- canonicalName - Variable in class com.squareup.javapoet.ClassName
- CHAR - Static variable in class com.squareup.javapoet.TypeName
- characterLiteralWithoutSingleQuotes(char) - Static method in class com.squareup.javapoet.Util
- checkArgument(boolean, String, Object...) - Static method in class com.squareup.javapoet.Util
- checkNotNull(T, String, Object...) - Static method in class com.squareup.javapoet.Util
- checkState(boolean, String, Object...) - Static method in class com.squareup.javapoet.Util
- CLASS - Enum constant in enum class com.squareup.javapoet.TypeSpec.Kind
- classBuilder(ClassName) - Static method in class com.squareup.javapoet.TypeSpec
- classBuilder(String) - Static method in class com.squareup.javapoet.TypeSpec
- ClassName - Class in com.squareup.javapoet
-
A fully-qualified class name for top-level and member classes.
- ClassName(List<String>) - Constructor for class com.squareup.javapoet.ClassName
- ClassName(List<String>, List<AnnotationSpec>) - Constructor for class com.squareup.javapoet.ClassName
- clone() - Method in class com.squareup.javapoet.NameAllocator
-
Create a deep copy of this NameAllocator.
- code - Variable in class com.squareup.javapoet.MethodSpec.Builder
- code - Variable in class com.squareup.javapoet.MethodSpec
- CodeBlock - Class in com.squareup.javapoet
-
A fragment of a .java file, potentially containing declarations, statements, and documentation.
- CodeBlock(CodeBlock.Builder) - Constructor for class com.squareup.javapoet.CodeBlock
- CodeBlock.Builder - Class in com.squareup.javapoet
- CodeWriter - Class in com.squareup.javapoet
-
Converts a
JavaFile
to a string suitable to both human- and javac-consumption. - CodeWriter(Appendable) - Constructor for class com.squareup.javapoet.CodeWriter
- CodeWriter(Appendable, String, Map<String, ClassName>, Set<String>) - Constructor for class com.squareup.javapoet.CodeWriter
- CodeWriter(Appendable, String, Set<String>) - Constructor for class com.squareup.javapoet.CodeWriter
- com.squareup.javapoet - package com.squareup.javapoet
- comment - Variable in class com.squareup.javapoet.CodeWriter
- compareTo(ClassName) - Method in class com.squareup.javapoet.ClassName
- componentType - Variable in class com.squareup.javapoet.ArrayTypeName
- concatAnnotations(List<AnnotationSpec>) - Method in class com.squareup.javapoet.TypeName
- CONSTRUCTOR - Static variable in class com.squareup.javapoet.MethodSpec
- constructorBuilder() - Static method in class com.squareup.javapoet.MethodSpec
D
- DEFAULT - Static variable in class com.squareup.javapoet.Util
-
Modifier.DEFAULT doesn't exist until Java 8, but we want to run on earlier releases.
- defaultAction(Object, String) - Method in class com.squareup.javapoet.AnnotationSpec.Visitor
- defaultValue - Variable in class com.squareup.javapoet.MethodSpec.Builder
- defaultValue - Variable in class com.squareup.javapoet.MethodSpec
- defaultValue(CodeBlock) - Method in class com.squareup.javapoet.MethodSpec.Builder
- defaultValue(String, Object...) - Method in class com.squareup.javapoet.MethodSpec.Builder
- Defining new types - Search tag in class com.squareup.javapoet.TypeName
- Section
- DOUBLE - Static variable in class com.squareup.javapoet.TypeName
E
- emit(CodeBlock) - Method in class com.squareup.javapoet.CodeWriter
- emit(CodeWriter) - Method in class com.squareup.javapoet.ArrayTypeName
- emit(CodeWriter) - Method in class com.squareup.javapoet.ClassName
- emit(CodeWriter) - Method in class com.squareup.javapoet.JavaFile
- emit(CodeWriter) - Method in class com.squareup.javapoet.ParameterizedTypeName
- emit(CodeWriter) - Method in class com.squareup.javapoet.TypeName
- emit(CodeWriter) - Method in class com.squareup.javapoet.TypeVariableName
- emit(CodeWriter) - Method in class com.squareup.javapoet.WildcardTypeName
- emit(CodeWriter, boolean) - Method in class com.squareup.javapoet.AnnotationSpec
- emit(CodeWriter, boolean) - Method in class com.squareup.javapoet.ParameterSpec
- emit(CodeWriter, String, Set<Modifier>) - Method in class com.squareup.javapoet.MethodSpec
- emit(CodeWriter, String, Set<Modifier>) - Method in class com.squareup.javapoet.TypeSpec
- emit(CodeWriter, Set<Modifier>) - Method in class com.squareup.javapoet.FieldSpec
- emit(String) - Method in class com.squareup.javapoet.CodeWriter
- emit(String, Object...) - Method in class com.squareup.javapoet.CodeWriter
- emitAndIndent(String) - Method in class com.squareup.javapoet.CodeWriter
-
Emits
s
with indentation as required. - emitAnnotations(CodeWriter) - Method in class com.squareup.javapoet.TypeName
- emitAnnotations(List<AnnotationSpec>, boolean) - Method in class com.squareup.javapoet.CodeWriter
- emitAnnotationValues(CodeWriter, String, String, List<CodeBlock>) - Method in class com.squareup.javapoet.AnnotationSpec
- emitComment(CodeBlock) - Method in class com.squareup.javapoet.CodeWriter
- emitIndentation() - Method in class com.squareup.javapoet.CodeWriter
- emitJavadoc(CodeBlock) - Method in class com.squareup.javapoet.CodeWriter
- emitLiteral(Object) - Method in class com.squareup.javapoet.CodeWriter
- emitModifiers(Set<Modifier>) - Method in class com.squareup.javapoet.CodeWriter
- emitModifiers(Set<Modifier>, Set<Modifier>) - Method in class com.squareup.javapoet.CodeWriter
-
Emits
modifiers
in the standard order. - emitStaticImportMember(String, String) - Method in class com.squareup.javapoet.CodeWriter
- emitTypeVariables(List<TypeVariableName>) - Method in class com.squareup.javapoet.CodeWriter
-
Emit type variables with their bounds.
- enclosingClassName() - Method in class com.squareup.javapoet.ClassName
-
Returns the enclosing class, like
Map
forMap.Entry
. - enclosingType - Variable in class com.squareup.javapoet.ParameterizedTypeName
- endControlFlow() - Method in class com.squareup.javapoet.CodeBlock.Builder
- endControlFlow() - Method in class com.squareup.javapoet.MethodSpec.Builder
- endControlFlow(String, Object...) - Method in class com.squareup.javapoet.CodeBlock.Builder
- endControlFlow(String, Object...) - Method in class com.squareup.javapoet.MethodSpec.Builder
- ENUM - Enum constant in enum class com.squareup.javapoet.TypeSpec.Kind
- enumBuilder(ClassName) - Static method in class com.squareup.javapoet.TypeSpec
- enumBuilder(String) - Static method in class com.squareup.javapoet.TypeSpec
- enumConstants - Variable in class com.squareup.javapoet.TypeSpec.Builder
- enumConstants - Variable in class com.squareup.javapoet.TypeSpec
- equals(Object) - Method in class com.squareup.javapoet.AnnotationSpec
- equals(Object) - Method in class com.squareup.javapoet.CodeBlock
- equals(Object) - Method in class com.squareup.javapoet.FieldSpec
- equals(Object) - Method in class com.squareup.javapoet.JavaFile
- equals(Object) - Method in class com.squareup.javapoet.MethodSpec
- equals(Object) - Method in class com.squareup.javapoet.ParameterSpec
- equals(Object) - Method in class com.squareup.javapoet.TypeName
- equals(Object) - Method in class com.squareup.javapoet.TypeSpec
- exceptions - Variable in class com.squareup.javapoet.MethodSpec.Builder
- exceptions - Variable in class com.squareup.javapoet.MethodSpec
- extractMemberName(String) - Static method in class com.squareup.javapoet.CodeWriter
F
- FieldSpec - Class in com.squareup.javapoet
-
A generated field declaration.
- FieldSpec(FieldSpec.Builder) - Constructor for class com.squareup.javapoet.FieldSpec
- FieldSpec.Builder - Class in com.squareup.javapoet
- fieldSpecs - Variable in class com.squareup.javapoet.TypeSpec.Builder
- fieldSpecs - Variable in class com.squareup.javapoet.TypeSpec
- fileComment - Variable in class com.squareup.javapoet.JavaFile.Builder
- fileComment - Variable in class com.squareup.javapoet.JavaFile
- FLOAT - Static variable in class com.squareup.javapoet.TypeName
- formatParts - Variable in class com.squareup.javapoet.CodeBlock.Builder
- formatParts - Variable in class com.squareup.javapoet.CodeBlock
-
A heterogeneous list containing string literals and value placeholders.
G
- get(ClassName, TypeName...) - Static method in class com.squareup.javapoet.ParameterizedTypeName
-
Returns a parameterized type, applying
typeArguments
torawType
. - get(Annotation) - Static method in class com.squareup.javapoet.AnnotationSpec
- get(Annotation, boolean) - Static method in class com.squareup.javapoet.AnnotationSpec
- get(Class<?>) - Static method in class com.squareup.javapoet.ClassName
- get(Class<?>, Type...) - Static method in class com.squareup.javapoet.ParameterizedTypeName
-
Returns a parameterized type, applying
typeArguments
torawType
. - get(Object) - Method in class com.squareup.javapoet.NameAllocator
-
Retrieve a name created with
NameAllocator.newName(String, Object)
. - get(GenericArrayType) - Static method in class com.squareup.javapoet.ArrayTypeName
-
Returns an array type equivalent to
type
. - get(GenericArrayType, Map<Type, TypeVariableName>) - Static method in class com.squareup.javapoet.ArrayTypeName
- get(ParameterizedType) - Static method in class com.squareup.javapoet.ParameterizedTypeName
-
Returns a parameterized type equivalent to
type
. - get(ParameterizedType, Map<Type, TypeVariableName>) - Static method in class com.squareup.javapoet.ParameterizedTypeName
-
Returns a parameterized type equivalent to
type
. - get(Type) - Static method in class com.squareup.javapoet.TypeName
-
Returns a type name equivalent to
type
. - get(Type, Map<Type, TypeVariableName>) - Static method in class com.squareup.javapoet.TypeName
- get(TypeVariable<?>) - Static method in class com.squareup.javapoet.TypeVariableName
-
Returns type variable equivalent to
type
. - get(TypeVariable<?>, Map<Type, TypeVariableName>) - Static method in class com.squareup.javapoet.TypeVariableName
- get(WildcardType) - Static method in class com.squareup.javapoet.WildcardTypeName
- get(WildcardType, Map<Type, TypeVariableName>) - Static method in class com.squareup.javapoet.WildcardTypeName
- get(String) - Static method in class com.squareup.javapoet.TypeVariableName
-
Returns type variable named
name
without bounds. - get(String, TypeName...) - Static method in class com.squareup.javapoet.TypeVariableName
-
Returns type variable named
name
withbounds
. - get(String, Type...) - Static method in class com.squareup.javapoet.TypeVariableName
-
Returns type variable named
name
withbounds
. - get(String, String, String...) - Static method in class com.squareup.javapoet.ClassName
-
Returns a class name created from the given parts.
- get(AnnotationMirror) - Static method in class com.squareup.javapoet.AnnotationSpec
- get(TypeElement) - Static method in class com.squareup.javapoet.ClassName
-
Returns the class name for
element
. - get(TypeParameterElement) - Static method in class com.squareup.javapoet.TypeVariableName
-
Returns type variable equivalent to
element
. - get(ArrayType) - Static method in class com.squareup.javapoet.ArrayTypeName
-
Returns an array type equivalent to
mirror
. - get(ArrayType, Map<TypeParameterElement, TypeVariableName>) - Static method in class com.squareup.javapoet.ArrayTypeName
- get(TypeMirror) - Static method in class com.squareup.javapoet.TypeName
-
Returns a type name equivalent to
mirror
. - get(TypeMirror, Map<TypeParameterElement, TypeVariableName>) - Static method in class com.squareup.javapoet.TypeName
- get(TypeVariable) - Static method in class com.squareup.javapoet.TypeVariableName
-
Returns type variable equivalent to
mirror
. - get(TypeVariable, Map<TypeParameterElement, TypeVariableName>) - Static method in class com.squareup.javapoet.TypeVariableName
-
Make a TypeVariableName for the given TypeMirror.
- get(WildcardType) - Static method in class com.squareup.javapoet.WildcardTypeName
- get(WildcardType, Map<TypeParameterElement, TypeVariableName>) - Static method in class com.squareup.javapoet.WildcardTypeName
- getPackage(Element) - Static method in class com.squareup.javapoet.ClassName
H
- hasDefaultModifier(Collection<Modifier>) - Static method in class com.squareup.javapoet.Util
- hashCode() - Method in class com.squareup.javapoet.AnnotationSpec
- hashCode() - Method in class com.squareup.javapoet.CodeBlock
- hashCode() - Method in class com.squareup.javapoet.FieldSpec
- hashCode() - Method in class com.squareup.javapoet.JavaFile
- hashCode() - Method in class com.squareup.javapoet.MethodSpec
- hashCode() - Method in class com.squareup.javapoet.ParameterSpec
- hashCode() - Method in class com.squareup.javapoet.TypeName
- hashCode() - Method in class com.squareup.javapoet.TypeSpec
- hasModifier(Modifier) - Method in class com.squareup.javapoet.FieldSpec
- hasModifier(Modifier) - Method in class com.squareup.javapoet.MethodSpec
- hasModifier(Modifier) - Method in class com.squareup.javapoet.ParameterSpec
- hasModifier(Modifier) - Method in class com.squareup.javapoet.TypeSpec
I
- immutableList(Collection<T>) - Static method in class com.squareup.javapoet.Util
- immutableMap(Map<K, V>) - Static method in class com.squareup.javapoet.Util
- immutableMultimap(Map<K, List<V>>) - Static method in class com.squareup.javapoet.Util
- immutableSet(Collection<T>) - Static method in class com.squareup.javapoet.Util
- implicitFieldModifiers - Variable in enum class com.squareup.javapoet.TypeSpec.Kind
- implicitMethodModifiers - Variable in enum class com.squareup.javapoet.TypeSpec.Kind
- implicitTypeModifiers - Variable in enum class com.squareup.javapoet.TypeSpec.Kind
- importableType(ClassName) - Method in class com.squareup.javapoet.CodeWriter
- importableTypes - Variable in class com.squareup.javapoet.CodeWriter
- importedTypes - Variable in class com.squareup.javapoet.CodeWriter
- importedTypes() - Method in class com.squareup.javapoet.CodeWriter
- indent - Variable in class com.squareup.javapoet.CodeWriter
- indent - Variable in class com.squareup.javapoet.JavaFile.Builder
- indent - Variable in class com.squareup.javapoet.JavaFile
- indent() - Method in class com.squareup.javapoet.CodeBlock.Builder
- indent() - Method in class com.squareup.javapoet.CodeWriter
- indent(int) - Method in class com.squareup.javapoet.CodeWriter
- indent(String) - Method in class com.squareup.javapoet.JavaFile.Builder
- indentLevel - Variable in class com.squareup.javapoet.CodeWriter
- initializer - Variable in class com.squareup.javapoet.FieldSpec.Builder
- initializer - Variable in class com.squareup.javapoet.FieldSpec
- initializer(CodeBlock) - Method in class com.squareup.javapoet.FieldSpec.Builder
- initializer(String, Object...) - Method in class com.squareup.javapoet.FieldSpec.Builder
- initializerBlock - Variable in class com.squareup.javapoet.TypeSpec.Builder
- initializerBlock - Variable in class com.squareup.javapoet.TypeSpec
- INT - Static variable in class com.squareup.javapoet.TypeName
- INTERFACE - Enum constant in enum class com.squareup.javapoet.TypeSpec.Kind
- interfaceBuilder(ClassName) - Static method in class com.squareup.javapoet.TypeSpec
- interfaceBuilder(String) - Static method in class com.squareup.javapoet.TypeSpec
- isAnnotated() - Method in class com.squareup.javapoet.TypeName
- isBoxedPrimitive() - Method in class com.squareup.javapoet.TypeName
-
Returns true if this is a boxed primitive type like
Integer
. - isClassOrInterface(Element) - Static method in class com.squareup.javapoet.ClassName
- isConstructor() - Method in class com.squareup.javapoet.MethodSpec
- isEmpty() - Method in class com.squareup.javapoet.CodeBlock
- isPrimitive() - Method in class com.squareup.javapoet.TypeName
-
Returns true if this is a primitive type like
int
.
J
- javadoc - Variable in class com.squareup.javapoet.CodeWriter
- javadoc - Variable in class com.squareup.javapoet.FieldSpec.Builder
- javadoc - Variable in class com.squareup.javapoet.FieldSpec
- javadoc - Variable in class com.squareup.javapoet.MethodSpec.Builder
- javadoc - Variable in class com.squareup.javapoet.MethodSpec
- javadoc - Variable in class com.squareup.javapoet.TypeSpec.Builder
- javadoc - Variable in class com.squareup.javapoet.TypeSpec
- JavaFile - Class in com.squareup.javapoet
-
A Java file containing a single top level class.
- JavaFile(JavaFile.Builder) - Constructor for class com.squareup.javapoet.JavaFile
- JavaFile.Builder - Class in com.squareup.javapoet
- join(String, List<String>) - Static method in class com.squareup.javapoet.Util
K
- keyword - Variable in class com.squareup.javapoet.TypeName
-
The name of this type if it is a keyword, or null.
- kind - Variable in class com.squareup.javapoet.TypeSpec.Builder
- kind - Variable in class com.squareup.javapoet.TypeSpec
- Kind(Set<Modifier>, Set<Modifier>, Set<Modifier>, Set<Modifier>) - Constructor for enum class com.squareup.javapoet.TypeSpec.Kind
L
- lastParameterIsArray(List<ParameterSpec>) - Method in class com.squareup.javapoet.MethodSpec
- list(Type[]) - Static method in class com.squareup.javapoet.TypeName
-
Converts an array of types to a list of type names.
- list(Type[], Map<Type, TypeVariableName>) - Static method in class com.squareup.javapoet.TypeName
- LONG - Static variable in class com.squareup.javapoet.TypeName
- lookupName(ClassName) - Method in class com.squareup.javapoet.CodeWriter
-
Returns the best name to identify
className
with in the current context. - lowerBounds - Variable in class com.squareup.javapoet.WildcardTypeName
M
- members - Variable in class com.squareup.javapoet.AnnotationSpec.Builder
- members - Variable in class com.squareup.javapoet.AnnotationSpec
- methodBuilder(String) - Static method in class com.squareup.javapoet.MethodSpec
- MethodSpec - Class in com.squareup.javapoet
-
A generated constructor or method declaration.
- MethodSpec(MethodSpec.Builder) - Constructor for class com.squareup.javapoet.MethodSpec
- MethodSpec.Builder - Class in com.squareup.javapoet
- methodSpecs - Variable in class com.squareup.javapoet.TypeSpec.Builder
- methodSpecs - Variable in class com.squareup.javapoet.TypeSpec
- modifiers - Variable in class com.squareup.javapoet.FieldSpec.Builder
- modifiers - Variable in class com.squareup.javapoet.FieldSpec
- modifiers - Variable in class com.squareup.javapoet.MethodSpec.Builder
- modifiers - Variable in class com.squareup.javapoet.MethodSpec
- modifiers - Variable in class com.squareup.javapoet.ParameterSpec.Builder
- modifiers - Variable in class com.squareup.javapoet.ParameterSpec
- modifiers - Variable in class com.squareup.javapoet.TypeSpec.Builder
- modifiers - Variable in class com.squareup.javapoet.TypeSpec
N
- name - Variable in class com.squareup.javapoet.FieldSpec.Builder
- name - Variable in class com.squareup.javapoet.FieldSpec
- name - Variable in class com.squareup.javapoet.MethodSpec.Builder
- name - Variable in class com.squareup.javapoet.MethodSpec
- name - Variable in class com.squareup.javapoet.ParameterSpec.Builder
- name - Variable in class com.squareup.javapoet.ParameterSpec
- name - Variable in class com.squareup.javapoet.TypeSpec.Builder
- name - Variable in class com.squareup.javapoet.TypeSpec
- name - Variable in class com.squareup.javapoet.TypeVariableName
- NameAllocator - Class in com.squareup.javapoet
-
Assigns Java identifier names to avoid collisions, keywords, and invalid characters.
- NameAllocator() - Constructor for class com.squareup.javapoet.NameAllocator
- NameAllocator(LinkedHashSet<String>, LinkedHashMap<Object, String>) - Constructor for class com.squareup.javapoet.NameAllocator
- names - Variable in class com.squareup.javapoet.ClassName
-
From top to bottom.
- nestedClass(String) - Method in class com.squareup.javapoet.ClassName
-
Returns a new
ClassName
instance for the specifiedname
as nested inside this class. - nestedClass(String) - Method in class com.squareup.javapoet.ParameterizedTypeName
-
Returns a new
ParameterizedTypeName
instance for the specifiedname
as nested inside this class. - nestedClass(String, List<TypeName>) - Method in class com.squareup.javapoet.ParameterizedTypeName
-
Returns a new
ParameterizedTypeName
instance for the specifiedname
as nested inside this class, with the specifiedtypeArguments
. - newName(String) - Method in class com.squareup.javapoet.NameAllocator
-
Return a new name using
suggestion
that will not be a Java identifier or clash with other names. - newName(String, Object) - Method in class com.squareup.javapoet.NameAllocator
-
Return a new name using
suggestion
that will not be a Java identifier or clash with other names. - nextControlFlow(String, Object...) - Method in class com.squareup.javapoet.CodeBlock.Builder
- nextControlFlow(String, Object...) - Method in class com.squareup.javapoet.MethodSpec.Builder
- NO_PACKAGE - Static variable in class com.squareup.javapoet.CodeWriter
-
Sentinel value that indicates that no user-provided package has been set.
- NULL_APPENDABLE - Static variable in class com.squareup.javapoet.JavaFile
O
- OBJECT - Static variable in class com.squareup.javapoet.ClassName
- OBJECT - Static variable in class com.squareup.javapoet.TypeName
- of(TypeName) - Static method in class com.squareup.javapoet.ArrayTypeName
-
Returns an array type whose elements are all instances of
componentType
. - of(Type) - Static method in class com.squareup.javapoet.ArrayTypeName
-
Returns an array type whose elements are all instances of
componentType
. - of(String, Object...) - Static method in class com.squareup.javapoet.CodeBlock
- of(String, List<TypeName>) - Static method in class com.squareup.javapoet.TypeVariableName
- originatingElements - Variable in class com.squareup.javapoet.TypeSpec.Builder
- originatingElements - Variable in class com.squareup.javapoet.TypeSpec
- out - Variable in class com.squareup.javapoet.CodeWriter
- OVERRIDE - Static variable in class com.squareup.javapoet.MethodSpec
- overriding(ExecutableElement) - Static method in class com.squareup.javapoet.MethodSpec
-
Returns a new method spec builder that overrides
method
. - overriding(ExecutableElement, DeclaredType, Types) - Static method in class com.squareup.javapoet.MethodSpec
-
Returns a new method spec builder that overrides
method
as a member ofenclosing
.
P
- packageName - Variable in class com.squareup.javapoet.CodeWriter
- packageName - Variable in class com.squareup.javapoet.JavaFile.Builder
- packageName - Variable in class com.squareup.javapoet.JavaFile
- packageName() - Method in class com.squareup.javapoet.ClassName
-
Returns the package name, like
"java.util"
forMap.Entry
. - ParameterizedTypeName - Class in com.squareup.javapoet
- ParameterizedTypeName(ParameterizedTypeName, ClassName, List<TypeName>) - Constructor for class com.squareup.javapoet.ParameterizedTypeName
- ParameterizedTypeName(ParameterizedTypeName, ClassName, List<TypeName>, List<AnnotationSpec>) - Constructor for class com.squareup.javapoet.ParameterizedTypeName
- parameters - Variable in class com.squareup.javapoet.MethodSpec.Builder
- parameters - Variable in class com.squareup.javapoet.MethodSpec
- ParameterSpec - Class in com.squareup.javapoet
-
A generated parameter declaration.
- ParameterSpec(ParameterSpec.Builder) - Constructor for class com.squareup.javapoet.ParameterSpec
- ParameterSpec.Builder - Class in com.squareup.javapoet
- peerClass(String) - Method in class com.squareup.javapoet.ClassName
-
Returns a class that shares the same enclosing package or class.
- popPackage() - Method in class com.squareup.javapoet.CodeWriter
- popType() - Method in class com.squareup.javapoet.CodeWriter
- pushPackage(String) - Method in class com.squareup.javapoet.CodeWriter
- pushType(TypeSpec) - Method in class com.squareup.javapoet.CodeWriter
R
- rawType - Variable in class com.squareup.javapoet.ParameterizedTypeName
- referencedNames - Variable in class com.squareup.javapoet.CodeWriter
- Referencing existing types - Search tag in class com.squareup.javapoet.TypeName
- Section
- requireExactlyOneOf(Set<Modifier>, Modifier...) - Static method in class com.squareup.javapoet.Util
- resolve(String) - Method in class com.squareup.javapoet.CodeWriter
-
Returns the class referenced by
simpleName
, using the current nesting context and imports. - returns(TypeName) - Method in class com.squareup.javapoet.MethodSpec.Builder
- returns(Type) - Method in class com.squareup.javapoet.MethodSpec.Builder
- returnType - Variable in class com.squareup.javapoet.MethodSpec.Builder
- returnType - Variable in class com.squareup.javapoet.MethodSpec
S
- SHORT - Static variable in class com.squareup.javapoet.TypeName
- simpleName() - Method in class com.squareup.javapoet.ClassName
-
Returns the simple name of this class, like
"Entry"
forMap.Entry
. - simpleNames() - Method in class com.squareup.javapoet.ClassName
- skipJavaLangImports - Variable in class com.squareup.javapoet.JavaFile.Builder
- skipJavaLangImports - Variable in class com.squareup.javapoet.JavaFile
- skipJavaLangImports(boolean) - Method in class com.squareup.javapoet.JavaFile.Builder
-
Call this to omit imports for classes in
java.lang
, such asjava.lang.String
. - stackClassName(int, String) - Method in class com.squareup.javapoet.CodeWriter
-
Returns the class named
simpleName
when nested in the class atstackDepth
. - statementLine - Variable in class com.squareup.javapoet.CodeWriter
-
When emitting a statement, this is the line of the statement currently being written.
- staticBlock - Variable in class com.squareup.javapoet.TypeSpec.Builder
- staticBlock - Variable in class com.squareup.javapoet.TypeSpec
- staticImportClassNames - Variable in class com.squareup.javapoet.CodeWriter
- staticImports - Variable in class com.squareup.javapoet.CodeWriter
- staticImports - Variable in class com.squareup.javapoet.JavaFile.Builder
- staticImports - Variable in class com.squareup.javapoet.JavaFile
- stringLiteralWithDoubleQuotes(String, String) - Static method in class com.squareup.javapoet.Util
-
Returns the string literal representing
value
, including wrapping double quotes. - subtypeOf(TypeName) - Static method in class com.squareup.javapoet.WildcardTypeName
-
Returns a type that represents an unknown type that extends
bound
. - subtypeOf(Type) - Static method in class com.squareup.javapoet.WildcardTypeName
- suggestedImports() - Method in class com.squareup.javapoet.CodeWriter
-
Returns the types that should have been imported for this code.
- superclass - Variable in class com.squareup.javapoet.TypeSpec.Builder
- superclass - Variable in class com.squareup.javapoet.TypeSpec
- superclass(TypeName) - Method in class com.squareup.javapoet.TypeSpec.Builder
- superclass(Type) - Method in class com.squareup.javapoet.TypeSpec.Builder
- superinterfaces - Variable in class com.squareup.javapoet.TypeSpec.Builder
- superinterfaces - Variable in class com.squareup.javapoet.TypeSpec
- supertypeOf(TypeName) - Static method in class com.squareup.javapoet.WildcardTypeName
-
Returns a type that represents an unknown supertype of
bound
. - supertypeOf(Type) - Static method in class com.squareup.javapoet.WildcardTypeName
T
- tagToName - Variable in class com.squareup.javapoet.NameAllocator
- toBuilder() - Method in class com.squareup.javapoet.AnnotationSpec
- toBuilder() - Method in class com.squareup.javapoet.CodeBlock
- toBuilder() - Method in class com.squareup.javapoet.FieldSpec
- toBuilder() - Method in class com.squareup.javapoet.JavaFile
- toBuilder() - Method in class com.squareup.javapoet.MethodSpec
- toBuilder() - Method in class com.squareup.javapoet.ParameterSpec
- toBuilder() - Method in class com.squareup.javapoet.TypeSpec
- toBuilder(TypeName, String) - Method in class com.squareup.javapoet.ParameterSpec
- toJavaFileObject() - Method in class com.squareup.javapoet.JavaFile
- toJavaIdentifier(String) - Static method in class com.squareup.javapoet.NameAllocator
- topLevelClassName() - Method in class com.squareup.javapoet.ClassName
-
Returns the top class in this nesting group.
- toString() - Method in class com.squareup.javapoet.AnnotationSpec
- toString() - Method in class com.squareup.javapoet.CodeBlock
- toString() - Method in class com.squareup.javapoet.FieldSpec
- toString() - Method in class com.squareup.javapoet.JavaFile
- toString() - Method in class com.squareup.javapoet.MethodSpec
- toString() - Method in class com.squareup.javapoet.ParameterSpec
- toString() - Method in class com.squareup.javapoet.TypeName
- toString() - Method in class com.squareup.javapoet.TypeSpec
- trailingNewline - Variable in class com.squareup.javapoet.CodeWriter
- type - Variable in class com.squareup.javapoet.AnnotationSpec.Builder
- type - Variable in class com.squareup.javapoet.AnnotationSpec
- type - Variable in class com.squareup.javapoet.FieldSpec.Builder
- type - Variable in class com.squareup.javapoet.FieldSpec
- type - Variable in class com.squareup.javapoet.ParameterSpec.Builder
- type - Variable in class com.squareup.javapoet.ParameterSpec
- typeArguments - Variable in class com.squareup.javapoet.ParameterizedTypeName
- TypeName - Class in com.squareup.javapoet
-
Any type in Java's type system, plus
void
. - TypeName(String) - Constructor for class com.squareup.javapoet.TypeName
- TypeName(String, List<AnnotationSpec>) - Constructor for class com.squareup.javapoet.TypeName
- TypeName(List<AnnotationSpec>) - Constructor for class com.squareup.javapoet.TypeName
- typeSpec - Variable in class com.squareup.javapoet.JavaFile.Builder
- typeSpec - Variable in class com.squareup.javapoet.JavaFile
- TypeSpec - Class in com.squareup.javapoet
-
A generated class, interface, or enum declaration.
- TypeSpec(TypeSpec.Builder) - Constructor for class com.squareup.javapoet.TypeSpec
- TypeSpec.Builder - Class in com.squareup.javapoet
- TypeSpec.Kind - Enum Class in com.squareup.javapoet
- typeSpecs - Variable in class com.squareup.javapoet.TypeSpec.Builder
- typeSpecs - Variable in class com.squareup.javapoet.TypeSpec
- typeSpecStack - Variable in class com.squareup.javapoet.CodeWriter
- TypeVariableName - Class in com.squareup.javapoet
- TypeVariableName(String, List<TypeName>) - Constructor for class com.squareup.javapoet.TypeVariableName
- TypeVariableName(String, List<TypeName>, List<AnnotationSpec>) - Constructor for class com.squareup.javapoet.TypeVariableName
- typeVariables - Variable in class com.squareup.javapoet.MethodSpec.Builder
- typeVariables - Variable in class com.squareup.javapoet.MethodSpec
- typeVariables - Variable in class com.squareup.javapoet.TypeSpec.Builder
- typeVariables - Variable in class com.squareup.javapoet.TypeSpec
U
- unbox() - Method in class com.squareup.javapoet.TypeName
-
Returns an unboxed type if this is a boxed primitive type (like
int
forInteger
) orVoid
. - unindent() - Method in class com.squareup.javapoet.CodeBlock.Builder
- unindent() - Method in class com.squareup.javapoet.CodeWriter
- unindent(int) - Method in class com.squareup.javapoet.CodeWriter
- union(Set<T>, Set<T>) - Static method in class com.squareup.javapoet.Util
- upperBounds - Variable in class com.squareup.javapoet.WildcardTypeName
- Util - Class in com.squareup.javapoet
-
Like Guava, but worse and standalone.
- Util() - Constructor for class com.squareup.javapoet.Util
V
- valueOf(String) - Static method in enum class com.squareup.javapoet.TypeSpec.Kind
-
Returns the enum constant of this class with the specified name.
- values() - Static method in enum class com.squareup.javapoet.TypeSpec.Kind
-
Returns an array containing the constants of this enum class, in the order they are declared.
- varargs - Variable in class com.squareup.javapoet.MethodSpec.Builder
- varargs - Variable in class com.squareup.javapoet.MethodSpec
- varargs() - Method in class com.squareup.javapoet.MethodSpec.Builder
- varargs(boolean) - Method in class com.squareup.javapoet.MethodSpec.Builder
- visitAnnotation(AnnotationMirror, String) - Method in class com.squareup.javapoet.AnnotationSpec.Visitor
- visitArray(List<? extends AnnotationValue>, String) - Method in class com.squareup.javapoet.AnnotationSpec.Visitor
- visitEnumConstant(VariableElement, String) - Method in class com.squareup.javapoet.AnnotationSpec.Visitor
- Visitor(AnnotationSpec.Builder) - Constructor for class com.squareup.javapoet.AnnotationSpec.Visitor
- visitType(TypeMirror, String) - Method in class com.squareup.javapoet.AnnotationSpec.Visitor
- VOID - Static variable in class com.squareup.javapoet.TypeName
W
- WildcardTypeName - Class in com.squareup.javapoet
- WildcardTypeName(List<TypeName>, List<TypeName>) - Constructor for class com.squareup.javapoet.WildcardTypeName
- WildcardTypeName(List<TypeName>, List<TypeName>, List<AnnotationSpec>) - Constructor for class com.squareup.javapoet.WildcardTypeName
- withBounds(TypeName...) - Method in class com.squareup.javapoet.TypeVariableName
- withBounds(Type...) - Method in class com.squareup.javapoet.TypeVariableName
- withBounds(List<TypeName>) - Method in class com.squareup.javapoet.TypeVariableName
- withoutAnnotations() - Method in class com.squareup.javapoet.ArrayTypeName
- withoutAnnotations() - Method in class com.squareup.javapoet.ClassName
- withoutAnnotations() - Method in class com.squareup.javapoet.ParameterizedTypeName
- withoutAnnotations() - Method in class com.squareup.javapoet.TypeName
- withoutAnnotations() - Method in class com.squareup.javapoet.TypeVariableName
- withoutAnnotations() - Method in class com.squareup.javapoet.WildcardTypeName
- writeTo(File) - Method in class com.squareup.javapoet.JavaFile
-
Writes this to
directory
the standard directory structure. - writeTo(Appendable) - Method in class com.squareup.javapoet.JavaFile
- writeTo(Path) - Method in class com.squareup.javapoet.JavaFile
-
Writes this to
directory
the standard directory structure. - writeTo(Filer) - Method in class com.squareup.javapoet.JavaFile
-
Writes this to
filer
.
All Classes and Interfaces|All Packages|Constant Field Values