public static class TypeWriter.FieldPool.Entry.Simple extends Object implements TypeWriter.FieldPool.Entry
FieldAttributeAppender.Factory
for any field.TypeWriter.FieldPool.Entry.NoOp, TypeWriter.FieldPool.Entry.Simple
Constructor and Description |
---|
Simple(FieldAttributeAppender attributeAppender,
Object defaultValue)
Creates a new simple entry for a given attribute appender factory.
|
Modifier and Type | Method and Description |
---|---|
void |
apply(org.objectweb.asm.ClassVisitor classVisitor,
FieldDescription fieldDescription)
Writes this entry to a given class visitor.
|
boolean |
equals(Object other) |
Object |
getDefaultValue()
Returns the default value for the field that is represented by this entry.
|
FieldAttributeAppender |
getFieldAppender()
Returns the field attribute appender for a given field.
|
int |
hashCode() |
String |
toString() |
public Simple(FieldAttributeAppender attributeAppender, Object defaultValue)
attributeAppender
- The attribute appender to be returned.defaultValue
- The field's default value or null
if no default value is
set.public FieldAttributeAppender getFieldAppender()
TypeWriter.FieldPool.Entry
getFieldAppender
in interface TypeWriter.FieldPool.Entry
public Object getDefaultValue()
TypeWriter.FieldPool.Entry
null
if no such value is set.getDefaultValue
in interface TypeWriter.FieldPool.Entry
public void apply(org.objectweb.asm.ClassVisitor classVisitor, FieldDescription fieldDescription)
TypeWriter.FieldPool.Entry
apply
in interface TypeWriter.FieldPool.Entry
classVisitor
- The class visitor to which this entry is to be written to.fieldDescription
- A description of the field that is to be written.Copyright © 2014–2015. All rights reserved.