A method can declare a list of exceptions it can throw, e.g.:
public static int c(int i) throws MyException, MyOtherException {... };
The Java language supports the following levels of access control:
Java-Code Reverse Engineering fully supports all levels of Java access control for classes, attributes, and operations.
These Java modifiers can be used, variously, on class, method, and variable declarations.
Modifier | Description |
---|---|
final | The final keyword is a modifier that can be applied to classes, methods, and variables. It has a similar, but not identical meaning in each case. A final class can never be subclassed. A final method can never be overridden. A final variable can never have its value set. Modifiers: operation: constant set to true attribute: constant set to true Access Permission is "read-only" Example: public final void writeDouble(double v) throws IOException {}; |
native | The native keyword is a modifier that can be applied to method declarations. It indicates that the method is implemented elsewhere in C, or in some other platform-dependent fashion. Modifiers: native is not capture will set "native" to true Example: private native void socketCreate(Boolean isServer); |
synchronized | The synchronized keyword can be used as a modifier for class or instance methods. It indicates that the method modifies the internal state of the class or the internal state of an instance of the class in a way that is not thread-safe. Modifier: Sets synchronized to trueprivate synchronized native String initializeLinkerInternal(); |
transient | The transient keyword is a modifier that can be applied to instance fields in a class. It indicates a field that is not part of an object's persistent state and thus needs not be serialized with the object. Modifier: Sets transient to true. Example: transient private int pData; |
volatile | The volatile keyword is a modifier that can be applied to fields. It specifies that the field is used by synchronized threads and that the compiler should not attempt to perform optimizations with it. Modifier: Sets volatile to true. Example: volatile private int pData; |