linkedin / linkedin/dexmaker

Example for declare(FieldId<?, ?> fieldId, int flags, Object staticValue)

Open
#110 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
2k
Forks
262
PR merge metrics
No merged PRs in 30d

Description

I would like to create a norma modal with all its fields are public but I can't figure our how to use the provided function declare(FieldId fieldId, int flags, Object staticValue). Can someone please provide me with a working example

I want to create something like that

public class ModelA {
    public String value1;
    public String value2;
    public String value3;
}

My issue is with FieldId value for the declare function.

this.dexMaker.declare(???, Modifier.PUBLIC, "");

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names DexMaker's declare(FieldId fieldId, int flags, Object staticValue) entry point and the Java ModelA example; start by tracing how FieldId is created for its public fields. Done means a documented, working example that supplies the FieldId values for value1, value2, and value3 and demonstrates the requested declaration.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
devtools
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.