maoruibin / maoruibin/maoruibin.github.com

枚举的替代写法

Open
#35 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

trick
Dominant language
HTML
Stars
22
Forks
4
PR merge metrics
No merged PRs in 30d

Description

class Layout {
    @IntDef({NORMAL, CENTER, TOP})
    @Retention(RetentionPolicy.SOURCE)
    public @interface Mode {}

    public static final int NORMAL = 0;
    public static final int CENTER = 1;
    public static final int TOP = 2;
}

form 关于Java中枚举Enum的深入剖析 - 技术小黑屋

Contributor guide

No contributing guide indexed for this repository

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

Start by reading the Java @IntDef example in the issue and the linked article about Java enums. The issue does not state what should change, so clarify the intended blog update before locating a source file or defining completion criteria.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
content, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.