Module org.glavo.classfile
Package org.glavo.classfile.impl
Class AbstractAttributeMapper<T extends Attribute<T>>
java.lang.Object
org.glavo.classfile.impl.AbstractAttributeMapper<T>
- All Implemented Interfaces:
AttributeMapper<T>
public abstract class AbstractAttributeMapper<T extends Attribute<T>>
extends Object
implements AttributeMapper<T>
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractAttributeMapper(String name, boolean allowMultiple) AbstractAttributeMapper(String name, boolean allowMultiple, int majorVersion) AbstractAttributeMapper(String name, int majorVersion) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether this attribute may appear more than once in a given location.name()Returns the name of the attribute.toString()intReturns The earliest classfile version for which this attribute is applicable.voidwriteAttribute(BufWriter buf, T attr) Write anAttributeinstance to a classfile.protected abstract voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.glavo.classfile.AttributeMapper
readAttribute
-
Constructor Details
-
AbstractAttributeMapper
-
AbstractAttributeMapper
-
AbstractAttributeMapper
-
AbstractAttributeMapper
-
-
Method Details
-
writeBody
-
name
Description copied from interface:AttributeMapperReturns the name of the attribute.- Specified by:
namein interfaceAttributeMapper<T extends Attribute<T>>- Returns:
- the name of the attribute
-
writeAttribute
Description copied from interface:AttributeMapperWrite anAttributeinstance to a classfile.- Specified by:
writeAttributein interfaceAttributeMapper<T extends Attribute<T>>- Parameters:
buf- TheBufWriterto which the attribute should be writtenattr- The attribute to write
-
allowMultiple
public boolean allowMultiple()Description copied from interface:AttributeMapperReturns whether this attribute may appear more than once in a given location.- Specified by:
allowMultiplein interfaceAttributeMapper<T extends Attribute<T>>- Returns:
- whether this attribute may appear more than once in a given location
-
validSince
public int validSince()Description copied from interface:AttributeMapperReturns The earliest classfile version for which this attribute is applicable.- Specified by:
validSincein interfaceAttributeMapper<T extends Attribute<T>>- Returns:
- The earliest classfile version for which this attribute is applicable
-
toString
-