Skip to main content

Crate ferro_jtype

Crate ferro_jtype 

Source
Expand description

Type inference for Java class-file bytecode.

Use infer_class for the default analysis configuration, or Inferer when analysis limits or strict diagnostic handling need to be customized. The returned ClassInference exposes inferred method, local-variable, and operand-stack types without requiring a JDK, Java runtime, or external class hierarchy. Use infer_classes to analyze a caller-supplied batch of class files.

Class names use the JVM internal form, such as java/lang/String.

Structs§

ClassHierarchy
An in-memory TypeHierarchy built solely from caller-supplied class files.
ClassInference
Type-inference results for one Java class file.
ClassInferences
Type-inference results for a caller-supplied batch of class files.
ClassName
A JVM internal class name.
Diagnostic
A recoverable condition observed while inferring types.
DiagnosticLocation
Location associated with an analysis diagnostic.
FieldSummaries
In-memory static-field value summaries supplied by the caller.
GenericClassSegment
A nested class segment in a generic class type.
GenericClassSignature
Parsed class generic signature.
GenericClassType
A parsed generic class type.
GenericMethodSignature
Parsed method generic signature.
GenericParameter
Formal parameters and bounds from a class or method signature.
GenericSignature
A generic JVM signature preserved from a Signature attribute.
InferenceConfig
Configuration for a class-file type-inference run.
Inferer
A reusable class-file type inferer.
InstructionInference
Inferred abstract state at one bytecode instruction.
IntegralTypeSet
The source-level primitive types still compatible with an integral JVM value.
MethodDescriptor
A parsed JVM method descriptor.
MethodInference
Type-inference results for one method.
MethodSummaries
In-memory method-return summaries supplied by the caller.
OperandExpectation
A verifier-derived type requirement for one operand-stack value.

Enums§

DescriptorError
Error returned when parsing a JVM type or method descriptor.
DiagnosticKind
Category of a condition observed during analysis.
DiagnosticSeverity
Severity assigned to an analysis diagnostic.
DynamicCallKind
Statically recognized kind of an invokedynamic call site.
Error
Error returned when a class file cannot be analyzed.
GenericArgument
An argument in a generic type argument list.
GenericType
A parsed JVM field type that preserves generic arguments.
GenericWildcard
A Java wildcard bound.
InferredType
Abstract JVM type inferred for a local variable or operand-stack value.
MethodInvocationKind
JVM member-invocation dispatch encoded by a bytecode instruction.
NameError
Error returned when parsing a JVM internal class name.
OperandConstraint
The JVM type condition required for an instruction operand.
PrimitiveType
A JVM primitive type from a field or method descriptor.
ReferenceType
Inferred state for a JVM reference value.
ReturnType
A JVM method return descriptor.
TypeDescriptor
A non-void JVM field type descriptor.

Traits§

FieldSummaryResolver
Resolves a caller-supplied inferred value type for one static field read.
MethodSummaryResolver
Resolves a caller-supplied inferred return type for one member invocation.
TypeHierarchy
Supplies direct supertypes for optional reference-type refinement.

Functions§

infer_class
Infers types from one complete Java class file using InferenceConfig::default.
infer_classes
Infers types from caller-supplied Java class files using InferenceConfig::default.