"

2013 FRC Java API

"

com.sun.squawk.pragma
Class PragmaException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.sun.squawk.pragma.PragmaException
Direct Known Subclasses:
AllowInlinedPragma, HostedPragma, InterpreterInvokedPragma, NativePragma, NotInlinedPragma, ReplacementConstructorPragma

public class PragmaException
extends RuntimeException

The root of the pragma exception hierarchy. These exceptions are all dummy exceptions that are never actually thrown. Methods declare them to be thrown as a way of indicating various properties.


Field Summary
static int ALLOW_INLINED
          Bit flag for methods that have relaxed inlinning by the translator.
static int FORCE_INLINED
           
static int FORCE_INLINED_A
          Bit flag for methods that are forceably inlined by the translator.
static int HOSTED
          Bit flag for hosted methods.
static int INTERPRETER_INVOKED
          Bit flag for methods that should only be invoked from the interpreter.
static int NATIVE
          Bit flag for methods that are made into native methods by the translator.
static int NOT_INLINED
          Bit flag for methods that are never inlined by the translator.
static int REPLACEMENT_CONSTRUCTOR
          Bit flag for replacement constructors.
 
Constructor Summary
PragmaException()
           
 
Method Summary
static boolean isAllowInlined(int pragmaFlags)
          Given a bit mask, tells whether the method must be inlined by the translator.
static boolean isForceInlined(int pragmaFlags)
          Given a bit mask, tells whether the method must be inlined by the translator.
static boolean isHosted(int pragmaFlags)
          Given a bit mask, tells whether the method is run only in a hosted environment.
static boolean isInterpreterInvoked(int pragmaFlags)
          Given a bit mask, tells whether the method is to be invoked only from the interpreter or JIT compiled code.
static boolean isNative(int pragmaFlags)
          Given a bit mask, tells whether the method will be turned into a native method by the translator.
static boolean isNotInlined(int pragmaFlags)
          Given a bit mask, tells whether the method is never inlined by the translator.
static boolean isReplacementConstructor(int pragmaFlags)
          Given a bit mask, tells whether a method has its body replace a constructor with the same signature.
static int toModifier(String className)
          Converts the name of a pragma class to a corresponding bit constant.
 
Methods inherited from class java.lang.Throwable
getMessage, printStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HOSTED

public static final int HOSTED
Bit flag for hosted methods.

See Also:
HostedPragma, Constant Field Values

REPLACEMENT_CONSTRUCTOR

public static final int REPLACEMENT_CONSTRUCTOR
Bit flag for replacement constructors.

See Also:
ReplacementConstructorPragma, Constant Field Values

INTERPRETER_INVOKED

public static final int INTERPRETER_INVOKED
Bit flag for methods that should only be invoked from the interpreter.

See Also:
InterpreterInvokedPragma, Constant Field Values

NATIVE

public static final int NATIVE
Bit flag for methods that are made into native methods by the translator.

See Also:
NativePragma, Constant Field Values

ALLOW_INLINED

public static final int ALLOW_INLINED
Bit flag for methods that have relaxed inlinning by the translator.

See Also:
AllowInlinedPragma, Constant Field Values

NOT_INLINED

public static final int NOT_INLINED
Bit flag for methods that are never inlined by the translator.

See Also:
NotInlinedPragma, Constant Field Values

FORCE_INLINED_A

public static final int FORCE_INLINED_A
Bit flag for methods that are forceably inlined by the translator. FORCE_INLINED implies ALLOW_INLINED

See Also:
ForceInlinedPragma, Constant Field Values

FORCE_INLINED

public static final int FORCE_INLINED
See Also:
Constant Field Values
Constructor Detail

PragmaException

public PragmaException()
Method Detail

isHosted

public static boolean isHosted(int pragmaFlags)
Given a bit mask, tells whether the method is run only in a hosted environment.


isReplacementConstructor

public static boolean isReplacementConstructor(int pragmaFlags)
Given a bit mask, tells whether a method has its body replace a constructor with the same signature. Such methods should never be explicitly called.


isInterpreterInvoked

public static boolean isInterpreterInvoked(int pragmaFlags)
Given a bit mask, tells whether the method is to be invoked only from the interpreter or JIT compiled code.


isNative

public static boolean isNative(int pragmaFlags)
Given a bit mask, tells whether the method will be turned into a native method by the translator.


isForceInlined

public static boolean isForceInlined(int pragmaFlags)
Given a bit mask, tells whether the method must be inlined by the translator.


isAllowInlined

public static boolean isAllowInlined(int pragmaFlags)
Given a bit mask, tells whether the method must be inlined by the translator.


isNotInlined

public static boolean isNotInlined(int pragmaFlags)
Given a bit mask, tells whether the method is never inlined by the translator.


toModifier

public static int toModifier(String className)
Converts the name of a pragma class to a corresponding bit constant.

Parameters:
className - the name of one of the hard-wired pragma exception classes
Returns:
the constant corresponding to className or 0 if className does not denote a pragma

"

2013 FRC Java API

"

"
For updated information see the Java FRC site
"