Uses of Class
com.squareup.javapoet.ClassName
-
Uses of ClassName in com.squareup.javapoet
Fields in com.squareup.javapoet declared as ClassNameModifier and TypeFieldDescriptionprivate static final ClassName
TypeName.BOXED_BOOLEAN
private static final ClassName
TypeName.BOXED_BYTE
private static final ClassName
TypeName.BOXED_CHAR
private static final ClassName
TypeName.BOXED_DOUBLE
private static final ClassName
TypeName.BOXED_FLOAT
private static final ClassName
TypeName.BOXED_INT
private static final ClassName
TypeName.BOXED_LONG
private static final ClassName
TypeName.BOXED_SHORT
private static final ClassName
TypeName.BOXED_VOID
(package private) final ClassName
ClassName.enclosingClassName
The enclosing class, or null if this is not enclosed in another class.static final ClassName
ClassName.OBJECT
static final ClassName
TypeName.OBJECT
final ClassName
ParameterizedTypeName.rawType
Fields in com.squareup.javapoet with type parameters of type ClassNameMethods in com.squareup.javapoet that return ClassNameModifier and TypeMethodDescriptionClassName.annotated
(List<AnnotationSpec> annotations) static ClassName
Returns a newClassName
instance for the given fully-qualified class name string.ClassName.enclosingClassName()
Returns the enclosing class, likeMap
forMap.Entry
.static ClassName
static ClassName
Returns a class name created from the given parts.static ClassName
ClassName.get
(TypeElement element) Returns the class name forelement
.ClassName.nestedClass
(String name) Returns a newClassName
instance for the specifiedname
as nested inside this class.Returns a class that shares the same enclosing package or class.private ClassName
Returns the class referenced bysimpleName
, using the current nesting context and imports.private ClassName
CodeWriter.stackClassName
(int stackDepth, String simpleName) Returns the class namedsimpleName
when nested in the class atstackDepth
.ClassName.topLevelClassName()
Returns the top class in this nesting group.ClassName.withoutAnnotations()
Methods in com.squareup.javapoet that return types with arguments of type ClassNameModifier and TypeMethodDescriptionClassName.enclosingClasses()
Returns all enclosing classes in this, outermost first.CodeWriter.importedTypes()
CodeWriter.suggestedImports()
Returns the types that should have been imported for this code.Methods in com.squareup.javapoet with parameters of type ClassNameModifier and TypeMethodDescriptionFieldSpec.Builder.addAnnotation
(ClassName annotation) MethodSpec.Builder.addAnnotation
(ClassName annotation) ParameterSpec.Builder.addAnnotation
(ClassName annotation) TypeSpec.Builder.addAnnotation
(ClassName annotation) JavaFile.Builder.addStaticImport
(ClassName className, String... names) static TypeSpec.Builder
TypeSpec.annotationBuilder
(ClassName className) static AnnotationSpec.Builder
static TypeSpec.Builder
TypeSpec.classBuilder
(ClassName className) int
static TypeSpec.Builder
TypeSpec.enumBuilder
(ClassName className) static ParameterizedTypeName
Returns a parameterized type, applyingtypeArguments
torawType
.private void
CodeWriter.importableType
(ClassName className) static TypeSpec.Builder
TypeSpec.interfaceBuilder
(ClassName className) (package private) String
CodeWriter.lookupName
(ClassName className) Returns the best name to identifyclassName
with in the current context.Constructors in com.squareup.javapoet with parameters of type ClassNameModifierConstructorDescriptionprivate
private
ClassName
(String packageName, ClassName enclosingClassName, String simpleName, List<AnnotationSpec> annotations) (package private)
ParameterizedTypeName
(ParameterizedTypeName enclosingType, ClassName rawType, List<TypeName> typeArguments) private
ParameterizedTypeName
(ParameterizedTypeName enclosingType, ClassName rawType, List<TypeName> typeArguments, List<AnnotationSpec> annotations) Constructor parameters in com.squareup.javapoet with type arguments of type ClassNameModifierConstructorDescription(package private)
CodeWriter
(Appendable out, String indent, Map<String, ClassName> importedTypes, Set<String> staticImports, Set<String> alwaysQualify)