{"uid":"cap_U42tssd5GDTTj0t7R1kNw","slug":"jvm-method-descriptor-parameter-and-local-variable-slot-layout-db082ed7","name":"JVM Method Descriptor Parameter and Local-Variable Slot Layout Reconstructor","description":"Reconstruct JVM parameter and return descriptors and initial local-variable slots for a classfile emitter.","url":"https://detect.halowerk.com/v1/F-TD2000-DOCUMENTS-06/jvms25-method-descriptor-parameter-local-slot-layout?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"artifact":{"type":"object","required":["jvmDescriptor"],"properties":{"jvmDescriptor":{"type":"object","required":["data","claim"],"properties":{"data":{"type":"object","required":["descriptor","is_static"],"properties":{"is_static":{"type":"boolean"},"descriptor":{"type":"string","maxLength":1024,"minLength":1}},"additionalProperties":false},"claim":{"anyOf":[{"type":"null"},{"type":"object","required":["parameters","return_type","parameter_slots","initial_local_slots"],"properties":{"parameters":{"type":"array","items":{"type":"object","required":["descriptor","type","array_dimensions","slots","local_slot"],"properties":{"type":{"type":"string","maxLength":1024,"minLength":1},"slots":{"type":"integer","maximum":2,"minimum":0},"descriptor":{"type":"string","maxLength":1024,"minLength":1},"local_slot":{"type":"integer","maximum":254,"minimum":0},"array_dimensions":{"type":"integer","maximum":255,"minimum":0}},"additionalProperties":false},"maxItems":255,"minItems":0},"return_type":{"type":"object","required":["descriptor","type","array_dimensions","slots"],"properties":{"type":{"type":"string","maxLength":1024,"minLength":1},"slots":{"type":"integer","maximum":2,"minimum":0},"descriptor":{"type":"string","maxLength":1024,"minLength":1},"array_dimensions":{"type":"integer","maximum":255,"minimum":0}},"additionalProperties":false},"parameter_slots":{"type":"integer","maximum":255,"minimum":0},"initial_local_slots":{"type":"integer","maximum":255,"minimum":0}},"additionalProperties":false}]}},"additionalProperties":false}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_L1DFBK_0epDdBAfXDoI1S","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Parses a JVM method descriptor string and returns the full parameter breakdown, return type, and initial local-variable slot assignments for use in classfile emission.","exampleAgentPrompt":"Parse the JVM method descriptor '(ILjava/lang/String;D)V' for a non-static method and give me the full parameter breakdown with their types, slot counts, local slot indices, and the initial local variable slot count I need for my classfile emitter.","exampleUseCases":[{"title":"Classfile emitter local slot setup","prompt":"I'm building a JVM classfile emitter and I have the method descriptor '(Ljava/lang/Object;IJ)Z' for a static method — can you reconstruct the parameter types, their slot assignments, and tell me the total initial local slots needed?"},{"title":"Bytecode rewriter parameter layout check","prompt":"I need to rewrite a non-static JVM method with descriptor '(DDLjava/lang/String;)Ljava/lang/Object;' — parse it and give me each parameter's type, descriptor, array dimensions, slot size, and local slot index so I can correctly offset my bytecode."},{"title":"Compiler backend descriptor validation","prompt":"My compiler backend is generating a static method with descriptor '([ILjava/util/List;B)V' — validate the descriptor, extract all parameter descriptors and types, and return how many local variable slots the method starts with."}],"resultDescription":"Returns a structured claim object containing: an array of parameters each with descriptor string, resolved type name, array dimensions, slot count (1 or 2), and local_slot index; a return_type object with the same fields minus local_slot; total parameter_slots count; and initial_local_slots count (accounting for implicit 'this' on instance methods).","failureModes":["Malformed or syntactically invalid JVM descriptor string returns an error","Descriptor exceeding 1024 characters is rejected by schema validation","Missing required fields (descriptor or is_static) causes a 400-level error","Descriptors with more than 255 parameters may be rejected","Network or service unavailability returns a non-200 response"],"whenToPreferThis":"Use this endpoint when building JVM bytecode emitters, compilers, or bytecode rewriters that need to programmatically determine local variable slot layout from a raw method descriptor string. It is especially useful when you need the exact local_slot index for each parameter (accounting for long/double double-slot types and the implicit 'this' reference in instance methods) without implementing the JVM spec parsing logic yourself.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-04T06:39:57.712Z","isFirstParty":false,"canonicalSlug":"jvm-method-descriptor-parameter-and-local-variable-slot-layout-db082ed7"}