Package org.spongepowered.asm.util
Class LanguageFeatures
- java.lang.Object
-
- org.spongepowered.asm.util.LanguageFeatures
-
public final class LanguageFeatures extends java.lang.ObjectBitmask values for language features supported. Contains utility methods for detecting language features in use in supplied class nodes.
-
-
Field Summary
Fields Modifier and Type Field Description static intDYNAMIC_CONSTANTSDynamic constantsstatic intMETHODS_IN_INTERFACESLanguage version supports methods in interfacesstatic intNESTINGNative nestingstatic intPRIVATE_METHODS_IN_INTERFACESLanguage version supports user-defined private methods in interfacesstatic intPRIVATE_SYNTHETIC_METHODS_IN_INTERFACESLanguage version supports synthetic private methods in interfacesstatic intRECORDSRecord typesstatic intSEALED_CLASSESSealed classes (permitted subclasses)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Stringformat(int features)Format the supplied feature mask as a plain-text list for use in error messages etc.static intscan(org.objectweb.asm.tree.ClassNode classNode)Scan the supplied class node to determine required language features via heuristic.
-
-
-
Field Detail
-
METHODS_IN_INTERFACES
public static final int METHODS_IN_INTERFACES
Language version supports methods in interfaces- See Also:
- Constant Field Values
-
PRIVATE_SYNTHETIC_METHODS_IN_INTERFACES
public static final int PRIVATE_SYNTHETIC_METHODS_IN_INTERFACES
Language version supports synthetic private methods in interfaces- See Also:
- Constant Field Values
-
PRIVATE_METHODS_IN_INTERFACES
public static final int PRIVATE_METHODS_IN_INTERFACES
Language version supports user-defined private methods in interfaces- See Also:
- Constant Field Values
-
NESTING
public static final int NESTING
Native nesting- See Also:
- Constant Field Values
-
DYNAMIC_CONSTANTS
public static final int DYNAMIC_CONSTANTS
Dynamic constants- See Also:
- Constant Field Values
-
RECORDS
public static final int RECORDS
Record types- See Also:
- Constant Field Values
-
SEALED_CLASSES
public static final int SEALED_CLASSES
Sealed classes (permitted subclasses)- See Also:
- Constant Field Values
-
-
Method Detail
-
scan
public static int scan(org.objectweb.asm.tree.ClassNode classNode)
Scan the supplied class node to determine required language features via heuristic.- Parameters:
classNode- ClassNode to scan (must include method bodies for reliable detection)- Returns:
- detected language features
-
format
public static final java.lang.String format(int features)
Format the supplied feature mask as a plain-text list for use in error messages etc.- Parameters:
features- Language features to format- Returns:
- Formatted list of features
-
-