Top Description Inners Fields Constructors Methods
org.glassfish.pfl.dynamic.codegen.impl

public final Class EmitterFactory

extends Object
Class Inheritance
Imports
java.util.ArrayList, .BitSet, .Iterator, .List, org.glassfish.pfl.basic.func.UnaryVoidFunction, org.glassfish.pfl.dynamic.codegen.spi.ClassInfo, .FieldInfo, .Type, .Variable, org.objectweb.asm.MethodVisitor

This class provides methods that allow the construction of an object that can later be used to emit a bytecode. This is useful when multiple visitors are needed for first preparing an AST, then generating the bytecode.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
EmitterFactory.CompoundEmitter

References Deprecated EmitterFactory.Emitter is deprecated or references (maybe indirectly) at least one deprecated element.
public static interface
EmitterFactory.Emitter

References Deprecated UnaryVoidFunction is deprecated or references (maybe indirectly) at least one deprecated element.
Simple wrapper class around a UnaryVoidFunction.
private static class
EmitterFactory.FieldInsnEmitter

References Deprecated EmitterFactory.Emitter is deprecated or references (maybe indirectly) at least one deprecated element.
private static class
EmitterFactory.IntOperandEmitter

References Deprecated EmitterFactory.Emitter is deprecated or references (maybe indirectly) at least one deprecated element.
public static class
EmitterFactory.NullEmitter

References Deprecated EmitterFactory.Emitter is deprecated or references (maybe indirectly) at least one deprecated element.
public static class
EmitterFactory.SimpleEmitter

References Deprecated EmitterFactory.Emitter is deprecated or references (maybe indirectly) at least one deprecated element.

Field Summary

Modifier and TypeField and Description
private static final EmitterFactory.Emitter
arrayLength

References Deprecated EmitterFactory.Emitter is deprecated or references (maybe indirectly) at least one deprecated element.
private static final EmitterFactory.Emitter
arrayLoad

References Deprecated EmitterFactory.Emitter is deprecated or references (maybe indirectly) at least one deprecated element.
private static final EmitterFactory.Emitter
arrayStore

References Deprecated EmitterFactory.Emitter is deprecated or references (maybe indirectly) at least one deprecated element.
private static final int
private static String[]
private static BitSet
private static BitSet
private static BitSet
private static BitSet
private static BitSet
private static BitSet
private static BitSet
private static BitSet
private static BitSet

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static void
check(BitSet validOps, int op)

private static int
getVarInsnOpcode(Type type, boolean isStore)

private static BitSet
makeBitSet(int... args)

public static EmitterFactory.Emitter
makeEmitter(Variable var, boolean isStore)
References Deprecated EmitterFactory.Emitter is deprecated or references (maybe indirectly) at least one deprecated element.

Create an emitter that generates the instruction needed to either store the TOS value into the variable (isStore==true) or push the variable's value onto the stack (isStore==false).

public static EmitterFactory.Emitter
makeEmitter(ExpressionFactory.NonStaticFieldAccessExpression expr, boolean isStore)
References Deprecated EmitterFactory.Emitter is deprecated or references (maybe indirectly) at least one deprecated element.

Create an emitter that generates the instruction needed to either store the TOS value into the non-static field (isStore==true) or push the non-static fields's value onto the stack (isStore==false).

public static EmitterFactory.Emitter
makeEmitter(ExpressionFactory.StaticFieldAccessExpression expr, boolean isStore)
References Deprecated EmitterFactory.Emitter is deprecated or references (maybe indirectly) at least one deprecated element.

Create an emitter that generates the instruction needed to either store the TOS value into the static field (isStore==true) or push the static fields's value onto the stack (isStore==false).

public static EmitterFactory.Emitter
makeEmitter(ExpressionFactory.ArrayIndexExpression expr, boolean isStore)
References Deprecated EmitterFactory.Emitter is deprecated or references (maybe indirectly) at least one deprecated element.

Create an emitter that generates the instruction needed to either store the TOS value into an array (aastore) (isStore==true) or push the array element's value onto the stack (aaload) (isStore==false).

public static EmitterFactory.Emitter
makeEmitter(ExpressionFactory.ArrayLengthExpression expr)
References Deprecated EmitterFactory.Emitter is deprecated or references (maybe indirectly) at least one deprecated element.

private static EmitterFactory.Emitter
makeFieldInsnEmitter(boolean isStore, boolean isStatic, Type targetType, String name, Type varType)
References Deprecated EmitterFactory.Emitter is deprecated or references (maybe indirectly) at least one deprecated element.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

arrayLengthback to summary
private static final EmitterFactory.Emitter arrayLength

References Deprecated

EmitterFactory.Emitter is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

arrayLoadback to summary
private static final EmitterFactory.Emitter arrayLoad

References Deprecated

EmitterFactory.Emitter is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

arrayStoreback to summary
private static final EmitterFactory.Emitter arrayStore

References Deprecated

EmitterFactory.Emitter is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

MAX_OPCODEback to summary
private static final int MAX_OPCODE
opcodeNamesback to summary
private static String[] opcodeNames
specialOpcodeSetback to summary
private static BitSet specialOpcodeSet
validOpcodeSetback to summary
private static BitSet validOpcodeSet
visitFieldInsnSetback to summary
private static BitSet visitFieldInsnSet
visitInsnSetback to summary
private static BitSet visitInsnSet
visitIntInsnSetback to summary
private static BitSet visitIntInsnSet
visitJumpInsnSetback to summary
private static BitSet visitJumpInsnSet
visitMethodInsnSetback to summary
private static BitSet visitMethodInsnSet
visitTypeInsnSetback to summary
private static BitSet visitTypeInsnSet
visitVarInsnSetback to summary
private static BitSet visitVarInsnSet

Constructor Detail

EmitterFactoryback to summary
private EmitterFactory()

Method Detail

checkback to summary
private static void check(BitSet validOps, int op)
getVarInsnOpcodeback to summary
private static int getVarInsnOpcode(Type type, boolean isStore)
makeBitSetback to summary
private static BitSet makeBitSet(int... args)
makeEmitterback to summary
public static EmitterFactory.Emitter makeEmitter(Variable var, boolean isStore)

References Deprecated

EmitterFactory.Emitter is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Create an emitter that generates the instruction needed to either store the TOS value into the variable (isStore==true) or push the variable's value onto the stack (isStore==false). The stack index must be set on var in the stackFrameSlot attribute.

makeEmitterback to summary
public static EmitterFactory.Emitter makeEmitter(ExpressionFactory.NonStaticFieldAccessExpression expr, boolean isStore)

References Deprecated

EmitterFactory.Emitter is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Create an emitter that generates the instruction needed to either store the TOS value into the non-static field (isStore==true) or push the non-static fields's value onto the stack (isStore==false).

makeEmitterback to summary
public static EmitterFactory.Emitter makeEmitter(ExpressionFactory.StaticFieldAccessExpression expr, boolean isStore)

References Deprecated

EmitterFactory.Emitter is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Create an emitter that generates the instruction needed to either store the TOS value into the static field (isStore==true) or push the static fields's value onto the stack (isStore==false).

makeEmitterback to summary
public static EmitterFactory.Emitter makeEmitter(ExpressionFactory.ArrayIndexExpression expr, boolean isStore)

References Deprecated

EmitterFactory.Emitter is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Create an emitter that generates the instruction needed to either store the TOS value into an array (aastore) (isStore==true) or push the array element's value onto the stack (aaload) (isStore==false). This emitter assumes that arrayref and index are already on the stack, and value is on the stack either before (aastore) or after (aaload) the instruction executes.

makeEmitterback to summary
public static EmitterFactory.Emitter makeEmitter(ExpressionFactory.ArrayLengthExpression expr)

References Deprecated

EmitterFactory.Emitter is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

makeFieldInsnEmitterback to summary
private static EmitterFactory.Emitter makeFieldInsnEmitter(boolean isStore, boolean isStatic, Type targetType, String name, Type varType)

References Deprecated

EmitterFactory.Emitter is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

org.glassfish.pfl.dynamic.codegen.impl back to summary

public Class EmitterFactory.CompoundEmitter

extends Object
implements Emitter
Class Inheritance
  • java.lang.Object
  • org.glassfish.pfl.dynamic.codegen.impl.EmitterFactory.CompoundEmitter
All Implemented Interfaces
org.glassfish.pfl.dynamic.codegen.impl.EmitterFactory.Emitter, org.glassfish.pfl.basic.func.UnaryVoidFunction, java.util.function.Consumer

References Deprecated

EmitterFactory.Emitter is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Field Summary

Modifier and TypeField and Description
private List<EmitterFactory.Emitter>

Constructor Summary

AccessConstructor and Description
public
CompoundEmitter(EmitterFactory.Emitter... args)
References Deprecated EmitterFactory.Emitter is deprecated or references (maybe indirectly) at least one deprecated element.

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object obj)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public void
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

emittersback to summary
private List<EmitterFactory.Emitter> emitters

Constructor Detail

CompoundEmitterback to summary
public CompoundEmitter(EmitterFactory.Emitter... args)

References Deprecated

EmitterFactory.Emitter is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Method Detail

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Annotations
@Override
evaluateback to summary
public void evaluate(MethodVisitor mv)

Implements org.glassfish.pfl.basic.func.UnaryVoidFunction.evaluate.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
org.glassfish.pfl.dynamic.codegen.impl back to summary

public Interface EmitterFactory.Emitter

extends UnaryVoidFunction<MethodVisitor>
Known Direct Implementers
org.glassfish.pfl.dynamic.codegen.impl.EmitterFactory.NullEmitter, org.glassfish.pfl.dynamic.codegen.impl.EmitterFactory.CompoundEmitter, org.glassfish.pfl.dynamic.codegen.impl.EmitterFactory.SimpleEmitter, org.glassfish.pfl.dynamic.codegen.impl.EmitterFactory.IntOperandEmitter, org.glassfish.pfl.dynamic.codegen.impl.EmitterFactory.FieldInsnEmitter

References Deprecated

UnaryVoidFunction is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Simple wrapper class around a UnaryVoidFunction. This exists to avoid problems with using nested generics.

Method Summary

Inherited from org.glassfish.pfl.basic.func.UnaryVoidFunction:
acceptevaluate
org.glassfish.pfl.dynamic.codegen.impl back to summary

private Class EmitterFactory.FieldInsnEmitter

extends Object
implements Emitter
Class Inheritance
  • java.lang.Object
  • org.glassfish.pfl.dynamic.codegen.impl.EmitterFactory.FieldInsnEmitter
All Implemented Interfaces
org.glassfish.pfl.dynamic.codegen.impl.EmitterFactory.Emitter, org.glassfish.pfl.basic.func.UnaryVoidFunction, java.util.function.Consumer

References Deprecated

EmitterFactory.Emitter is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Field Summary

Modifier and TypeField and Description
private String
private String
private int
private String

Constructor Summary

AccessConstructor and Description
public
FieldInsnEmitter(int opcode, String owner, String name, String desc)

The opcode must be one of the PUT/GET FIELD/STATIC instructions.

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object obj)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public void
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

descback to summary
private String desc
nameback to summary
private String name
opcodeback to summary
private int opcode
ownerback to summary
private String owner

Constructor Detail

FieldInsnEmitterback to summary
public FieldInsnEmitter(int opcode, String owner, String name, String desc)

The opcode must be one of the PUT/GET FIELD/STATIC instructions.

Method Detail

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

evaluateback to summary
public void evaluate(MethodVisitor mv)

Implements org.glassfish.pfl.basic.func.UnaryVoidFunction.evaluate.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

org.glassfish.pfl.dynamic.codegen.impl back to summary

private Class EmitterFactory.IntOperandEmitter

extends Object
implements Emitter
Class Inheritance
  • java.lang.Object
  • org.glassfish.pfl.dynamic.codegen.impl.EmitterFactory.IntOperandEmitter
All Implemented Interfaces
org.glassfish.pfl.dynamic.codegen.impl.EmitterFactory.Emitter, org.glassfish.pfl.basic.func.UnaryVoidFunction, java.util.function.Consumer

References Deprecated

EmitterFactory.Emitter is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Field Summary

Modifier and TypeField and Description
private int
private int
private static BitSet

Constructor Summary

AccessConstructor and Description
public
IntOperandEmitter(int opcode, int arg)

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object obj)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public void
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

argback to summary
private int arg
opcodeback to summary
private int opcode
validOpsback to summary
private static BitSet validOps

Constructor Detail

IntOperandEmitterback to summary
public IntOperandEmitter(int opcode, int arg)

Method Detail

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

evaluateback to summary
public void evaluate(MethodVisitor mv)

Implements org.glassfish.pfl.basic.func.UnaryVoidFunction.evaluate.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

org.glassfish.pfl.dynamic.codegen.impl back to summary

public Class EmitterFactory.NullEmitter

extends Object
implements Emitter
Class Inheritance
  • java.lang.Object
  • org.glassfish.pfl.dynamic.codegen.impl.EmitterFactory.NullEmitter
All Implemented Interfaces
org.glassfish.pfl.dynamic.codegen.impl.EmitterFactory.Emitter, org.glassfish.pfl.basic.func.UnaryVoidFunction, java.util.function.Consumer

References Deprecated

EmitterFactory.Emitter is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object obj)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public void
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Constructor Detail

NullEmitterback to summary
public NullEmitter()

Method Detail

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Annotations
@Override
evaluateback to summary
public void evaluate(MethodVisitor mv)

Implements org.glassfish.pfl.basic.func.UnaryVoidFunction.evaluate.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
org.glassfish.pfl.dynamic.codegen.impl back to summary

public Class EmitterFactory.SimpleEmitter

extends Object
implements Emitter
Class Inheritance
  • java.lang.Object
  • org.glassfish.pfl.dynamic.codegen.impl.EmitterFactory.SimpleEmitter
All Implemented Interfaces
org.glassfish.pfl.dynamic.codegen.impl.EmitterFactory.Emitter, org.glassfish.pfl.basic.func.UnaryVoidFunction, java.util.function.Consumer

References Deprecated

EmitterFactory.Emitter is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Field Summary

Modifier and TypeField and Description
private int

Constructor Summary

AccessConstructor and Description
public
SimpleEmitter(int opcode)

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object obj)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public void
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

opcodeback to summary
private int opcode

Constructor Detail

SimpleEmitterback to summary
public SimpleEmitter(int opcode)

Method Detail

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

evaluateback to summary
public void evaluate(MethodVisitor mv)

Implements org.glassfish.pfl.basic.func.UnaryVoidFunction.evaluate.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override