Skip to content
This repository has been archived by the owner. It is now read-only.

Commit d6d5771

Browse files
authored
Merge pull request #351 from scalacenter/protobuf
Add protobuf-based analysis binary store
2 parents 486a4dc + ceab256 commit d6d5771

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/main/java/xsbti/api/Modifiers.java

+19
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,25 @@ public Modifiers(boolean isAbstract, boolean isOverride, boolean isFinal, boolea
3737
);
3838
}
3939

40+
/**
41+
* Allow to set the modifiers from a flags byte where:
42+
*
43+
* 1. The first bit tells if has an abstract modifier.
44+
* 2. The second bit tells if has an override modifier.
45+
* 3. The third bit tells if has an final modifier.
46+
* 4. The fourth bit tells if has an sealed modifier.
47+
* 5. The fifth bit tells if has an implicit modifier.
48+
* 6. The sixth bit tells if has an lazy modifier.
49+
* 7. The seventh bit tells if has an macro modifier.
50+
* 8. The eighth bit tells if has an super accessor modifier.
51+
*
52+
* This method is not part of the public API and it may be removed at any point.
53+
* @param flags An instance of byte encoding the modifiers.
54+
*/
55+
protected Modifiers(byte flags) {
56+
this.flags = flags;
57+
}
58+
4059
private final byte flags;
4160

4261
private boolean flag(int bit)

0 commit comments

Comments
 (0)