Package org.agrona.generation
Class SpecialisationGenerator
java.lang.Object
org.agrona.generation.SpecialisationGenerator
Specialise classes written for primitive type int for other primitive types by substitution.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Substitution to be performed on each code line. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Main method.static void
specialise
(List<SpecialisationGenerator.Substitution> substitutions, String packageName, String srcClassName, String srcDirName, String dstDirName) Specialise a class replacing int types based onSpecialisationGenerator.Substitution
s.
-
Field Details
-
COLLECTIONS_PACKAGE
- See Also:
-
SRC_DIR
- See Also:
-
DST_DIR
- See Also:
-
SUFFIX
- See Also:
-
SUBSTITUTIONS
-
-
Constructor Details
-
SpecialisationGenerator
public SpecialisationGenerator()
-
-
Method Details
-
main
Main method.- Parameters:
args
- command line args.- Throws:
IOException
- in case of I/O error.
-
specialise
public static void specialise(List<SpecialisationGenerator.Substitution> substitutions, String packageName, String srcClassName, String srcDirName, String dstDirName) throws IOException Specialise a class replacing int types based onSpecialisationGenerator.Substitution
s.- Parameters:
substitutions
- to be applied.packageName
- for the source and destination classes.srcClassName
- to be specialised.srcDirName
- containing the source file.dstDirName
- for where the generated file should be stored.- Throws:
IOException
- if an error occurs.
-