8#ifndef RPNX_CORTADO_SIGNATURES_HPP
9#define RPNX_CORTADO_SIGNATURES_HPP
30 struct class_type_signature;
31 struct type_variable_signature;
32 struct array_type_signature;
37 using value_type = rpnx::variant< class_type_signature, type_variable_signature, array_type_signature >;
45 using value_type = rpnx::variant< primitive_type_descriptor, reference_type_signature >;
78 using type_argument = std::variant< any_type_argument, exact_type_argument, extends_type_argument, super_type_argument >;
Owning syntax trees and codecs for JVM field and method descriptors.
Exception types used by parsing, validation, and assembly APIs.
JVM class-file, bytecode, validation, generation, and JAR APIs.
std::variant< class_type_signature, type_variable_signature > throws_signature
A declared throws signature for a class or type-variable exception.
class_signature parse_class_signature(std::string_view text, signature_parse_options const &options={})
Parses a complete class generic signature.
std::string serialize_class_signature(class_signature const &signature)
Serializes a class generic signature.
std::variant< any_type_argument, exact_type_argument, extends_type_argument, super_type_argument > type_argument
One generic class type argument.
std::string serialize_field_signature(reference_type_signature const &signature)
Serializes a field or record-component generic signature.
method_signature parse_method_signature(std::string_view text, signature_parse_options const &options={})
Parses a complete method generic signature.
std::variant< void_type_descriptor, java_type_signature > method_result_signature
A void or Java-type method result signature.
std::string serialize_method_signature(method_signature const &signature)
Serializes a method generic signature.
reference_type_signature parse_field_signature(std::string_view text, signature_parse_options const &options={})
Parses a complete field or record-component generic signature.
An unbounded wildcard type argument.
An array whose component is another Java type signature.
java_type_signature component
Immediate array component type.
A complete class Signature attribute grammar value.
class_type_signature superclass
Generic signature of the direct superclass.
std::vector< type_parameter > type_parameters
Generic parameters declared by the class.
std::vector< class_type_signature > superinterfaces
Generic direct superinterfaces in class-file order.
A possibly parameterized and nested class type signature.
std::vector< simple_class_type_signature > nested_classes
Dot-separated nested class segments in source order.
simple_class_type_signature outer_class
First class segment after the package prefix.
std::string package_name
Slash-separated package prefix, empty for the unnamed package.
An invariant reference type argument.
reference_type_signature type
Invariant reference type following the = grammar marker.
An extends-bounded wildcard type argument.
reference_type_signature bound
Upper bound following the + grammar marker.
A primitive or reference Java type signature.
value_type value
Concrete primitive or reference alternative.
A complete method Signature attribute grammar value.
std::vector< java_type_signature > parameters
Formal parameter signatures in invocation order.
method_result_signature result
Return type or explicit void alternative.
std::vector< type_parameter > type_parameters
Generic parameters declared by the method.
std::vector< throws_signature > throws_signatures
Declared generic exception signatures.
A class, type-variable, or array reference type in a generic signature.
value_type value
Concrete class, type-variable, or array alternative.
Resource limits applied while parsing an untrusted generic signature.
std::size_t maximum_nesting_depth
Maximum recursive grammar depth accepted from untrusted input.
std::size_t maximum_nodes
Maximum syntax-tree nodes constructed by one parse.
One simple class segment, including its type arguments.
std::vector< type_argument > arguments
Generic arguments applied to this class segment.
std::string identifier
Simple class identifier without package or nesting separators.
A super-bounded wildcard type argument.
reference_type_signature bound
Lower bound following the - grammar marker.
One generic type parameter and all of its declared bounds.
std::string identifier
Declared parameter name.
std::optional< reference_type_signature > class_bound
Class bound, absent for the grammar's empty class bound.
std::vector< reference_type_signature > interface_bounds
Interface bounds in declaration order.
A generic type-variable reference.
std::string identifier
Declared type-parameter identifier without T or ; delimiters.