Constructor and Description |
---|
StringSwitchWriter() |
Modifier and Type | Method and Description |
---|---|
protected void |
generateDefault()
Generate default statement.
|
protected void |
generateValueCase(org.objectweb.asm.commons.GeneratorAdapter writer,
String string,
org.objectweb.asm.Label end)
Generate the switch case.
|
protected abstract Set<String> |
getKeys() |
protected abstract void |
onMatch(String value,
org.objectweb.asm.Label end)
Generate on case matches statement.
|
protected abstract void |
pushStringValue()
Push the string value that is being evaluated.
|
void |
write(org.objectweb.asm.commons.GeneratorAdapter writer)
Write the string switch implementation.
|
protected abstract void pushStringValue()
protected abstract void onMatch(String value, org.objectweb.asm.Label end)
value
- The string that matchedend
- The end labelprotected void generateDefault()
public void write(org.objectweb.asm.commons.GeneratorAdapter writer)
writer
- The writerprotected void generateValueCase(org.objectweb.asm.commons.GeneratorAdapter writer, String string, org.objectweb.asm.Label end)
writer
- The writerstring
- The string matchedend
- The end label