public final class ClassWriter extends TypeWriter
| Modifier and Type | Class and Description |
|---|---|
static interface |
Writable.Context |
| Modifier and Type | Method and Description |
|---|---|
ConstructorWriter |
addConstructor() |
void |
addTypeParameter(TypeVariableName typeVariableName) |
void |
addTypeParameters(Iterable<TypeVariableName> typeVariableNames) |
Set<ClassName> |
referencedClasses() |
void |
setSuperclass(TypeName typeReference) |
void |
setSupertype(TypeElement supertype)
If
supertype is a class, makes this class extend it; if it is an interface, makes this
class implement it. |
List<TypeVariableName> |
typeParameters() |
Appendable |
write(Appendable appendable,
Writable.Context context) |
addField, addField, addField, addImplementedType, addImplementedType, addMethod, addMethod, addMethod, addMethod, addNestedClass, nameaddModifiers, addModifiers, annotate, annotatepublic void setSuperclass(TypeName typeReference)
public void setSupertype(TypeElement supertype)
supertype is a class, makes this class extend it; if it is an interface, makes this
class implement it.public ConstructorWriter addConstructor()
public void addTypeParameter(TypeVariableName typeVariableName)
public void addTypeParameters(Iterable<TypeVariableName> typeVariableNames)
public List<TypeVariableName> typeParameters()
public Appendable write(Appendable appendable, Writable.Context context) throws IOException
IOExceptionCopyright © 2015 Google, Inc.. All Rights Reserved.