Java Doc for Runtime.java in  » Scripting » Pnuts » pnuts » lang » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Scripting » Pnuts » pnuts.lang 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   pnuts.lang.Runtime

All known Subclasses:   pnuts.lang.PnutsInterpreter,  pnuts.lang.SimpleFunctionSerializer,  pnuts.lang.DefaultFunctionSerializer,  pnuts.lang.Function,  pnuts.lang.PnutsFunction,  pnuts.lang.PnutsImpl,
Runtime
public class Runtime implements Executable(Code)
This class provides runtime supports for Pnuts compiler/interpreter. Most of the methods are protected static, so that only subclasses can access them.

Inner Class :static class TooLongFormat extends RuntimeException
Inner Class :static class AutoloadScript implements AutoloadHook,Serializable
Inner Class :protected static class TypeMap
Inner Class :protected static class Accessor
Inner Class :static class BeanInfoParam
Inner Class :public static class Break extends RuntimeException
Inner Class :public static class Continue extends RuntimeException
Inner Class :static class RangeGenerator extends Generator
Inner Class :static class ThreadLocalContext extends ThreadLocal
Inner Class :public static interface FunctionSerializer
Inner Class :static class PropertyWatcher implements PropertyChangeListener

Field Summary
final protected static  StringBOOLEAN_SYMBOL
    
final protected static  StringBYTE_SYMBOL
    
final protected static  StringCHAR_SYMBOL
    
final protected static  StringCLONE
    
final protected static  StringDOUBLE_SYMBOL
    
final protected static  StringEXCEPTOIN_FIELD_SYMBOL
    
final protected static  StringFLOAT_SYMBOL
    
final protected static  StringINT_SYMBOL
    
final protected static  StringLONG_SYMBOL
    
final protected static  Object[]NO_PARAM
    
final protected static  StringSHORT_SYMBOL
    
final protected static  StringVOID_SYMBOL
    
protected  CachefieldCache
    
static  FunctionSerializerfunctionSerializer
    
static  ThreadLocalthreadContext
    

Constructor Summary
protected  Runtime()
    

Method Summary
protected  Object_callConstructor(Context context, Class c, Object args, Class types)
    
protected  Object_callMethod(Context context, Class c, String name, Object args, Class types, Object target)
    
protected  Object_getField(Context context, Class c, String name, Object target)
    
protected  void_putField(Context context, Class cls, String name, Object target, Object value)
    
final public static  Objectadd(Object n1, Object n2)
    
final protected static  Objectadd(Object n1, Object n2, Context context)
    
final public static  Objectadd1(Object n)
    
final protected static  Objectadd1(Object n, Context context)
    
public static  voidaddImport(Context context, String name)
    
public static  voidaddStaticMembers(Context context, String name, boolean wildcard)
    
final public static  Objectand(Object n1, Object n2)
    
final protected static  Objectand(Object n1, Object n2, Context context)
    
public static  ObjectapplyGenerator(Generator g, PnutsFunction closure, Context context)
    
public static  ClassarrayType(Class c, int dim)
    
protected static  intarraydim(Object o)
    
final public static  Objectcall(Context context, Object target, Object[] args, Class[] casts)
    
final public static  Objectcall(Context context, Object target, Object[] args, Class[] casts, int line, int column)
    
public static  ObjectcallConstructor(Context context, Class c, Object args, Class types)
    
final protected static  ObjectcallFunction(Context context, PnutsFunction func, Object[] args)
    
public static  ObjectcallMethod(Context context, Class c, String name, Object args, Class types, Object target)
    
public static  Objectcast(Context context, Class type, Object object, boolean flag)
    
protected static  voidcatchException(Class type, PnutsFunction func, Context context)
    
protected static  voidcheckException(Context context, Throwable throwable)
    
protected static  voidcheckException(Context context, Throwable throwable, TypeMap tmap)
     Check if any exception handler is registered to the specified exception. If any an exception handler is executed.
static  intcompareArrays(Object a1, Object a2)
    
static  intcompareListToArray(List ol, Object array)
    
static  intcompareLists(List ol1, List ol2)
    
public static  intcompareObjects(Object e1, Object e2)
     Compare two objects Elements of List and array are recursively compared.
final public static  intcompareTo(Object n1, Object n2)
    
final protected static  intcompareTo(Object n1, Object n2, Context context)
    
static  Numbercompress(Number n)
    
public static  CachecreateCache()
    
protected static  ListcreateList(Context context)
    
protected static  MapcreateMap(int size, Context context)
    
public static  MapcreateWeakMap()
    
static  NumberdecimalNumber(String s, int radix)
    
protected static  PnutsFunctiondefineTopLevelFunction(Function f, String symbol, Package pkg, Context context)
    
protected static  PnutsFunctiondefineUnboundFunction(Function f, String symbol, Package pkg)
    
static  voiddeserializePnutsFunction(PnutsFunction pnutsFunction, ObjectInputStream s)
    
final public static  Objectdivide(Object n1, Object n2)
    
final protected static  Objectdivide(Object n1, Object n2, Context context)
    
final public static  booleaneq(Object n1, Object n2)
    
final protected static  booleaneq(Object n1, Object n2, Context context)
    
protected static  voidescape(Object v)
    
protected  Objectexec(Context context)
     This method is overrided by classes generated by the compiler.
public  Objectexecute(Context context)
     Executes a compiled script.
public static  URLfileToURL(File file)
    
protected static  MethodfindCallableMethod(Class clazz, String name, Class args)
    
public static  Stringformat(Object object, int maxArrayLength)
     Get the String representation of the specified object.
public static  Stringformat(Object object, int maxArrayLength, int maxFormatSize)
    
public static  Stringformat(Object object, int maxArrayLength, int maxFormatSize, char[] paren)
    
static  voidformat(Object object, int maxArrayLength, int maxFormatSize, char[] paren, Set formattedObjects, StringBuffer sb)
    
static  voidformatElement(Object obj, int maxArrayLength, int maxFormatSize, char[] paren, Set formattedObjects, StringBuffer sb)
    
final public static  booleange(Object n1, Object n2)
    
final protected static  booleange(Object n1, Object n2, Context context)
    
final public static  intgetArrayLength(Object array)
    
public static  ObjectgetBeanProperty(Context context, Object target, String name)
     Gets a Bean property of the specified bean.
public  ObjectgetBeanProperty(Object target, String name)
     Gets a Bean property of the specified bean.
protected  ObjectgetBeanProperty(Object target, String name, Class stopClass)
     Gets a Bean property of the specified bean.
public  ClassgetBeanPropertyType(Class cls, String name)
    
protected static  intgetBeginColumn(Context context)
    
protected static  intgetBeginLine(Context context)
    
public static  booleangetBoolean(String key)
    
public static  ClassgetBottomType(Class clazz)
     Get true component type from an array type.
static  StringgetClassName(Class cls)
    
public static  ExecutablegetCompiledScript(String name, Context context)
     This method is called by Pnuts.load() when the property "pnuts.compiled.script.prefix" is defined, to load pre-compiled scripts.
Parameters:
  name - the script name
Parameters:
  context - the context in which the class is loaded.
protected static  Constructor[]getConstructors(Context context, Class cls)
    
static  ImportEnvgetDefaultImports(Context context)
    
public static  RuntimegetDefaultRuntime()
    
public static  ObjectgetElement(Object target, Object key, Context context)
    
public static  ObjectgetElementAt(Object target, int idx, Context context)
    
protected static  intgetEndLine(Context context)
    
public static  ObjectgetField(Context context, Object target, String name)
     Get the value of a instance field.
protected  FieldgetField(Class cls, String name)
    
protected static  FunctiongetFunction(PnutsFunction pf, int nargs)
    
protected static  FunctiongetFunction(Context context)
    
protected static  EnumerationgetFunctions(PnutsFunction pf)
    
protected static  StringgetMessage(String bundleName, String key, Object a)
    
protected static  Method[]getMethods(Context context, Class cls)
    
public static  StringgetProperty(String key)
    
public static  ObjectgetRange(Object target, Object idx1, Object idx2, Context context)
     Range expression 'target[idx1..idx2]'. the intersection of the whole range of the target object and therange [idx1..idx2].
protected static  RuntimegetRuntime(Context context)
    
public static  ReadergetScriptReader(InputStream in, Context context)
     Gets a Reader to read script files If context.getScriptEncoding() is non-null, it would be used as the encoding.
protected static  ObjectgetScriptSource(Context context)
    
public static  URLgetScriptURL(String name, Context context)
    
public static  ObjectgetStaticField(Context context, Class clazz, String name)
     Get the value of a static field.
public static  ContextgetThreadContext()
    
final public static  booleangt(Object n1, Object n2)
    
final protected static  booleangt(Object n1, Object n2, Context context)
    
final public static  booleanisArray(Object obj)
    
public static  booleanisGenerator(SimpleNode node)
    
protected static  voidjump(Object v)
    
final public static  booleanle(Object n1, Object n2)
    
final protected static  booleanle(Object n1, Object n2, Context context)
    
public static  SimpleNodeloadNode(String str)
    
static  ObjectlookupTopLevelValue(String symbol, Context context)
    
final public static  booleanlt(Object n1, Object n2)
    
final protected static  booleanlt(Object n1, Object n2, Context context)
    
protected static  ObjectmakeArray(Object[] parameters, Context context)
    
protected static  intmatchType(Class type, Object obj)
    
final public static  Objectmod(Object n1, Object n2)
    
final protected static  Objectmod(Object n1, Object n2, Context context)
    
final public static  Objectmultiply(Object n1, Object n2)
    
final protected static  Objectmultiply(Object n1, Object n2, Context context)
    
final public static  booleanne(Object n1, Object n2)
    
final protected static  booleanne(Object n1, Object n2, Context context)
    
final public static  Objectnegate(Object n)
    
final protected static  Objectnegate(Object n, Context context)
    
protected static  ObjectnewInstance(Context context, Class c, Object[] args, Class[] casts)
    
final public static  Objectnot(Object n)
    
final protected static  Objectnot(Object n, Context context)
    
final public static  Objector(Object n1, Object n2)
    
final protected static  Objector(Object n1, Object n2, Context context)
    
public static  CharacterparseChar(String str)
     Parse a character literal.
public static  Object[]parseFloat(String str)
     Parse a floating point number.
public static  Object[]parseInt(String str)
     Parse an integer.
static  Object[]parseInt(String str, int radix, boolean shrink)
    
public static  StringparseString(String str, int offset)
     Parse a string literal.
public static  Objectprimitive(Context context, Class primitiveType, Object param, boolean flag)
    
static  Objectprimitive(Class primitiveType, Object param, boolean flag, int radix)
    
public static  voidprintError(Throwable t, Context context)
    
public static  voidputField(Context context, Object target, String name, Object expr)
     Assign an object to a instance field.
public static  voidputStaticField(Context context, Class clazz, String name, Object expr)
     Assign an object to a static field.
public static  Objectquantity(Number number, String numberString, String unit, Context context)
    
static  voidrecoverParseError(PnutsParser parser, int tokenType)
    
public static  StringreplaceChar(String str, Number n, Object expr)
    
public  Objectrun(Context context)
     Executes a compiled script.
public static  StringsaveNode(SimpleNode node)
    
static  voidserializePnutsFunction(PnutsFunction pnutsFunction, ObjectOutputStream s)
    
public static  voidsetBeanProperty(Context context, Object target, String name, Object value)
     Sets a Bean property of the specified bean.
public  voidsetBeanProperty(Object target, String name, Object value)
     Sets a Bean property of the specified bean.
protected  voidsetBeanProperty(Object target, String name, Object value, Class stopClass)
     Sets a Bean property of the specified bean.
public static  voidsetElement(Object target, Object key, Object value, Context context)
    
public static  voidsetExitHook(Context context, PnutsFunction func)
    
protected static  voidsetLine(Context context, int beginLine, int beginColumn)
    
public static  voidsetLine(Context context, int line)
    
protected static  voidsetPackage(Package pkg, Context context)
    
public static  ObjectsetRange(Object target, Object idx1, Object idx2, Object expr, Context context)
    
public static  voidsetThreadContext(Context context)
    
protected static  voidsetupPropertyChangeListeners(Map table, Context context)
    
public static  ObjectshiftArithmetic(Object n1, Object n2)
    
final protected static  ObjectshiftArithmetic(Object n1, Object n2, Context context)
    
final public static  ObjectshiftLeft(Object n1, Object n2)
    
final protected static  ObjectshiftLeft(Object n1, Object n2, Context context)
    
final public static  ObjectshiftRight(Object n1, Object n2)
    
final protected static  ObjectshiftRight(Object n1, Object n2, Context context)
    
final public static  Objectsubtract(Object n1, Object n2)
    
final protected static  Objectsubtract(Object n1, Object n2, Context context)
    
final public static  Objectsubtract1(Object n)
    
final protected static  Objectsubtract1(Object n, Context context)
    
public static  voidthrowException(Object arg, Context context)
    
public static  BooleantoBoolean(Object param)
    
public static  EnumerationtoEnumeration(Object target, Context context)
    
protected static  SimpleNodetoFunctionNode(SimpleNode body)
    
public static  Objecttransform(Class type, Object obj)
    
public static  Objecttransform(Class type, Object obj, Context context)
    
public static  Stringunparse(SimpleNode node, Context context)
    
protected static  voidwatchProperty(Map table, Object obj, String property, Object memberTarget, String memberName, Callable rhs)
    
final public static  Objectxor(Object n1, Object n2)
    
final protected static  Objectxor(Object n1, Object n2, Context context)
    

Field Detail
BOOLEAN_SYMBOL
final protected static String BOOLEAN_SYMBOL(Code)



BYTE_SYMBOL
final protected static String BYTE_SYMBOL(Code)



CHAR_SYMBOL
final protected static String CHAR_SYMBOL(Code)



CLONE
final protected static String CLONE(Code)



DOUBLE_SYMBOL
final protected static String DOUBLE_SYMBOL(Code)



EXCEPTOIN_FIELD_SYMBOL
final protected static String EXCEPTOIN_FIELD_SYMBOL(Code)



FLOAT_SYMBOL
final protected static String FLOAT_SYMBOL(Code)



INT_SYMBOL
final protected static String INT_SYMBOL(Code)



LONG_SYMBOL
final protected static String LONG_SYMBOL(Code)



NO_PARAM
final protected static Object[] NO_PARAM(Code)



SHORT_SYMBOL
final protected static String SHORT_SYMBOL(Code)



VOID_SYMBOL
final protected static String VOID_SYMBOL(Code)



fieldCache
protected Cache fieldCache(Code)



functionSerializer
static FunctionSerializer functionSerializer(Code)



threadContext
static ThreadLocal threadContext(Code)




Constructor Detail
Runtime
protected Runtime()(Code)




Method Detail
_callConstructor
protected Object _callConstructor(Context context, Class c, Object args, Class types)(Code)
Call a constructor
Parameters:
  context - the context in which the constructor is called
Parameters:
  c - the class of method
Parameters:
  args - the paramters
Parameters:
  types - the types of the formal arguments the created instance



_callMethod
protected Object _callMethod(Context context, Class c, String name, Object args, Class types, Object target)(Code)
Call a method
Parameters:
  context - the context
Parameters:
  c - the class of method
Parameters:
  name - the method name
Parameters:
  args - the paramters
Parameters:
  types - the types of the formal arguments
Parameters:
  target - the target object the return value



_getField
protected Object _getField(Context context, Class c, String name, Object target)(Code)



_putField
protected void _putField(Context context, Class cls, String name, Object target, Object value)(Code)



add
final public static Object add(Object n1, Object n2)(Code)
+ operation



add
final protected static Object add(Object n1, Object n2, Context context)(Code)



add1
final public static Object add1(Object n)(Code)
Add 1 to an object (integer)



add1
final protected static Object add1(Object n, Context context)(Code)



addImport
public static void addImport(Context context, String name)(Code)



addStaticMembers
public static void addStaticMembers(Context context, String name, boolean wildcard)(Code)



and
final public static Object and(Object n1, Object n2)(Code)
& operation



and
final protected static Object and(Object n1, Object n2, Context context)(Code)



applyGenerator
public static Object applyGenerator(Generator g, PnutsFunction closure, Context context)(Code)



arrayType
public static Class arrayType(Class c, int dim)(Code)
Creates an array type
Parameters:
  c - the component type
Parameters:
  dim - the number of dimensions



arraydim
protected static int arraydim(Object o)(Code)



call
final public static Object call(Context context, Object target, Object[] args, Class[] casts)(Code)
This method is called by the syntax "funcOrClass(args...)"



call
final public static Object call(Context context, Object target, Object[] args, Class[] casts, int line, int column)(Code)



callConstructor
public static Object callConstructor(Context context, Class c, Object args, Class types)(Code)
Call a constructor
Parameters:
  context - the context in which the constructor is called
Parameters:
  c - the class of method
Parameters:
  args - the paramters
Parameters:
  types - the types of the formal arguments the created instance



callFunction
final protected static Object callFunction(Context context, PnutsFunction func, Object[] args)(Code)
Call a function
Parameters:
  context - the context in which the function is called
Parameters:
  func - the function to be called
Parameters:
  args - the arguments



callMethod
public static Object callMethod(Context context, Class c, String name, Object args, Class types, Object target)(Code)
Call a method
Parameters:
  context - the context in which the method is called
Parameters:
  c - the class of method
Parameters:
  name - the method name
Parameters:
  args - the paramters
Parameters:
  types - the types of the paramters
Parameters:
  target - the target object the return value of the call



cast
public static Object cast(Context context, Class type, Object object, boolean flag)(Code)
This method is called by the syntax "(Class)object"
Parameters:
  context - the context
Parameters:
  type - the type
Parameters:
  flag - object_array <->primitive_array conversion



catchException
protected static void catchException(Class type, PnutsFunction func, Context context)(Code)
This method is called when catch() function is called in a package(non-local) scope
Parameters:
  type - the exception type of which an exception handler is registered
Parameters:
  func - the function to be registered as an exception handler
Parameters:
  context - the context in which the exception handler is registered



checkException
protected static void checkException(Context context, Throwable throwable)(Code)



checkException
protected static void checkException(Context context, Throwable throwable, TypeMap tmap)(Code)
Check if any exception handler is registered to the specified exception. If any an exception handler is executed. If not, the exception is thrown.
Parameters:
  context - the Context in which the exception is checked
Parameters:
  throwable - the exception
Parameters:
  tmap - the exception handler table



compareArrays
static int compareArrays(Object a1, Object a2)(Code)



compareListToArray
static int compareListToArray(List ol, Object array)(Code)



compareLists
static int compareLists(List ol1, List ol2)(Code)



compareObjects
public static int compareObjects(Object e1, Object e2)(Code)
Compare two objects Elements of List and array are recursively compared.



compareTo
final public static int compareTo(Object n1, Object n2)(Code)
Compares n1 with n2



compareTo
final protected static int compareTo(Object n1, Object n2, Context context)(Code)



compress
static Number compress(Number n)(Code)



createCache
public static Cache createCache()(Code)



createList
protected static List createList(Context context)(Code)



createMap
protected static Map createMap(int size, Context context)(Code)



createWeakMap
public static Map createWeakMap()(Code)



decimalNumber
static Number decimalNumber(String s, int radix)(Code)



defineTopLevelFunction
protected static PnutsFunction defineTopLevelFunction(Function f, String symbol, Package pkg, Context context)(Code)



defineUnboundFunction
protected static PnutsFunction defineUnboundFunction(Function f, String symbol, Package pkg)(Code)



deserializePnutsFunction
static void deserializePnutsFunction(PnutsFunction pnutsFunction, ObjectInputStream s) throws IOException, ClassNotFoundException(Code)



divide
final public static Object divide(Object n1, Object n2)(Code)
/ operation



divide
final protected static Object divide(Object n1, Object n2, Context context)(Code)



eq
final public static boolean eq(Object n1, Object n2)(Code)
== operation



eq
final protected static boolean eq(Object n1, Object n2, Context context)(Code)



escape
protected static void escape(Object v)(Code)



exec
protected Object exec(Context context)(Code)
This method is overrided by classes generated by the compiler.
Parameters:
  context - the context in which this object is executed the result of the execution



execute
public Object execute(Context context)(Code)
Executes a compiled script. Exceptions are checked if an exception handler is registered with the catch() function. Output stream of the specified context is flushed after the script is executed or an exception is thrown.
Parameters:
  context - the context in which this object is executed the result of the execution



fileToURL
public static URL fileToURL(File file) throws IOException(Code)
Gets a URL from a File
Parameters:
  file - the File object the resulting URL object



findCallableMethod
protected static Method findCallableMethod(Class clazz, String name, Class args)(Code)



format
public static String format(Object object, int maxArrayLength)(Code)
Get the String representation of the specified object.
Parameters:
  object - the target object.
Parameters:
  maxArrayLength - When the target object is an array and maxArrayLength isgreater than zero, only the first maxArrayLength elements areprinted and the rest of the elements are omitted as "...".



format
public static String format(Object object, int maxArrayLength, int maxFormatSize)(Code)



format
public static String format(Object object, int maxArrayLength, int maxFormatSize, char[] paren)(Code)



format
static void format(Object object, int maxArrayLength, int maxFormatSize, char[] paren, Set formattedObjects, StringBuffer sb)(Code)



formatElement
static void formatElement(Object obj, int maxArrayLength, int maxFormatSize, char[] paren, Set formattedObjects, StringBuffer sb)(Code)



ge
final public static boolean ge(Object n1, Object n2)(Code)
>= operation



ge
final protected static boolean ge(Object n1, Object n2, Context context)(Code)



getArrayLength
final public static int getArrayLength(Object array)(Code)
Gets an array's length
Parameters:
  array - the array the length



getBeanProperty
public static Object getBeanProperty(Context context, Object target, String name)(Code)
Gets a Bean property of the specified bean.
Parameters:
  context - the context
Parameters:
  target - the target bean
Parameters:
  name - the Bean property name



getBeanProperty
public Object getBeanProperty(Object target, String name) throws IllegalAccessException, InvocationTargetException(Code)
Gets a Bean property of the specified bean.
Parameters:
  target - the target bean
Parameters:
  name - the Bean property name



getBeanProperty
protected Object getBeanProperty(Object target, String name, Class stopClass) throws IllegalAccessException, InvocationTargetException(Code)
Gets a Bean property of the specified bean.
Parameters:
  target - the target bean
Parameters:
  name - the Bean property name
Parameters:
  stopClass - the Introspector's "stopClass"



getBeanPropertyType
public Class getBeanPropertyType(Class cls, String name)(Code)
Gets the type of a bean property
Parameters:
  cls - the class of the bean
Parameters:
  name - the property name of the bean property the type of the property



getBeginColumn
protected static int getBeginColumn(Context context)(Code)



getBeginLine
protected static int getBeginLine(Context context)(Code)



getBoolean
public static boolean getBoolean(String key)(Code)



getBottomType
public static Class getBottomType(Class clazz)(Code)
Get true component type from an array type. e.g. int[][] ==> int, String[] ==> String
Parameters:
  clazz - An array type to be examined The component type of the array type.



getClassName
static String getClassName(Class cls)(Code)



getCompiledScript
public static Executable getCompiledScript(String name, Context context)(Code)
This method is called by Pnuts.load() when the property "pnuts.compiled.script.prefix" is defined, to load pre-compiled scripts.
Parameters:
  name - the script name
Parameters:
  context - the context in which the class is loaded. pnuts.lang.Runtime object if the class is found, otherwise null.



getConstructors
protected static Constructor[] getConstructors(Context context, Class cls)(Code)



getDefaultImports
static ImportEnv getDefaultImports(Context context)(Code)



getDefaultRuntime
public static Runtime getDefaultRuntime()(Code)



getElement
public static Object getElement(Object target, Object key, Context context)(Code)
This method is called by the syntax "target[key]"



getElementAt
public static Object getElementAt(Object target, int idx, Context context)(Code)



getEndLine
protected static int getEndLine(Context context)(Code)



getField
public static Object getField(Context context, Object target, String name)(Code)
Get the value of a instance field.
Parameters:
  context - the context in which the field is accessed
Parameters:
  target - the target object of the field
Parameters:
  name - the name of the field the value



getField
protected Field getField(Class cls, String name)(Code)



getFunction
protected static Function getFunction(PnutsFunction pf, int nargs)(Code)



getFunction
protected static Function getFunction(Context context)(Code)



getFunctions
protected static Enumeration getFunctions(PnutsFunction pf)(Code)



getMessage
protected static String getMessage(String bundleName, String key, Object a)(Code)



getMethods
protected static Method[] getMethods(Context context, Class cls)(Code)



getProperty
public static String getProperty(String key)(Code)



getRange
public static Object getRange(Object target, Object idx1, Object idx2, Context context)(Code)
Range expression 'target[idx1..idx2]'. the intersection of the whole range of the target object and therange [idx1..idx2]. This method never throwArrayIndexOutOfBoundsException.



getRuntime
protected static Runtime getRuntime(Context context)(Code)



getScriptReader
public static Reader getScriptReader(InputStream in, Context context)(Code)
Gets a Reader to read script files If context.getScriptEncoding() is non-null, it would be used as the encoding. Otherwise, the platform encoding is used.
Parameters:
  in - the input stream
Parameters:
  context - the executing context the resulting reader object



getScriptSource
protected static Object getScriptSource(Context context)(Code)



getScriptURL
public static URL getScriptURL(String name, Context context)(Code)
Returns a URL of a script



getStaticField
public static Object getStaticField(Context context, Class clazz, String name)(Code)
Get the value of a static field.
Parameters:
  context - the context in which the field is accessed
Parameters:
  clazz - the class in which the static field is defined
Parameters:
  name - the name of the static field the value



getThreadContext
public static Context getThreadContext()(Code)
Sets the context bound to the current thread the context



gt
final public static boolean gt(Object n1, Object n2)(Code)
> operation



gt
final protected static boolean gt(Object n1, Object n2, Context context)(Code)



isArray
final public static boolean isArray(Object obj)(Code)
Check if the parameter is an array
Parameters:
  obj - the object to be checked true if the obj is an array, false otherwise.



isGenerator
public static boolean isGenerator(SimpleNode node)(Code)



jump
protected static void jump(Object v)(Code)



le
final public static boolean le(Object n1, Object n2)(Code)
<= operation



le
final protected static boolean le(Object n1, Object n2, Context context)(Code)



loadNode
public static SimpleNode loadNode(String str)(Code)



lookupTopLevelValue
static Object lookupTopLevelValue(String symbol, Context context)(Code)



lt
final public static boolean lt(Object n1, Object n2)(Code)
< operation



lt
final protected static boolean lt(Object n1, Object n2, Context context)(Code)



makeArray
protected static Object makeArray(Object[] parameters, Context context)(Code)



matchType
protected static int matchType(Class type, Object obj)(Code)



mod
final public static Object mod(Object n1, Object n2)(Code)
% operation



mod
final protected static Object mod(Object n1, Object n2, Context context)(Code)



multiply
final public static Object multiply(Object n1, Object n2)(Code)
operation



multiply
final protected static Object multiply(Object n1, Object n2, Context context)(Code)



ne
final public static boolean ne(Object n1, Object n2)(Code)
!= operation



ne
final protected static boolean ne(Object n1, Object n2, Context context)(Code)



negate
final public static Object negate(Object n)(Code)
Negates an number



negate
final protected static Object negate(Object n, Context context)(Code)



newInstance
protected static Object newInstance(Context context, Class c, Object[] args, Class[] casts)(Code)



not
final public static Object not(Object n)(Code)



not
final protected static Object not(Object n, Context context)(Code)



or
final public static Object or(Object n1, Object n2)(Code)
| operation



or
final protected static Object or(Object n1, Object n2, Context context)(Code)



parseChar
public static Character parseChar(String str) throws ParseException(Code)
Parse a character literal. the value



parseFloat
public static Object[] parseFloat(String str)(Code)
Parse a floating point number. an array [Number number, int offset_of_unit_symbol]



parseInt
public static Object[] parseInt(String str) throws ParseException(Code)
Parse an integer. an array [Number number, int offset_of_unit_symbol]



parseInt
static Object[] parseInt(String str, int radix, boolean shrink) throws ParseException(Code)



parseString
public static String parseString(String str, int offset) throws ParseException(Code)
Parse a string literal. the value



primitive
public static Object primitive(Context context, Class primitiveType, Object param, boolean flag)(Code)
This method is called by the syntax "primitiveType(object)" and "(primitiveType)object"
Parameters:
  context - the context
Parameters:
  primitiveType - a primitive type
Parameters:
  param - the parameter
Parameters:
  flag - string <->number conversion



primitive
static Object primitive(Class primitiveType, Object param, boolean flag, int radix)(Code)



printError
public static void printError(Throwable t, Context context)(Code)



putField
public static void putField(Context context, Object target, String name, Object expr)(Code)
Assign an object to a instance field.
Parameters:
  context - the context in which the field is accessed
Parameters:
  target - the target object of the field
Parameters:
  name - the name of the field
Parameters:
  expr - the value to be assigned



putStaticField
public static void putStaticField(Context context, Class clazz, String name, Object expr)(Code)
Assign an object to a static field.
Parameters:
  context - the context in which the field is accessed
Parameters:
  clazz - the class in which the static field is defined
Parameters:
  name - the name of the static field
Parameters:
  expr - the value to be assigned



quantity
public static Object quantity(Number number, String numberString, String unit, Context context)(Code)
Creates an object from a number literal and a unit symbol
Parameters:
  number - a number object
Parameters:
  numberString - a symbol of the number literal
Parameters:
  unit - a unit symbol
Parameters:
  context - a context in which the quantity is created



recoverParseError
static void recoverParseError(PnutsParser parser, int tokenType)(Code)



replaceChar
public static String replaceChar(String str, Number n, Object expr)(Code)



run
public Object run(Context context)(Code)
Executes a compiled script. Exceptions are checked if an exception handler is registered with the catch() function. Output stream of the specified context is flushed after the script is executed or an exception is thrown.
Parameters:
  context - the context in which this object is executed the result of the execution



saveNode
public static String saveNode(SimpleNode node)(Code)



serializePnutsFunction
static void serializePnutsFunction(PnutsFunction pnutsFunction, ObjectOutputStream s) throws IOException(Code)



setBeanProperty
public static void setBeanProperty(Context context, Object target, String name, Object value)(Code)
Sets a Bean property of the specified bean.
Parameters:
  context - the context
Parameters:
  target - the target bean
Parameters:
  name - the Bean property name
Parameters:
  value - the value of the Bean property



setBeanProperty
public void setBeanProperty(Object target, String name, Object value) throws IllegalAccessException, InvocationTargetException(Code)
Sets a Bean property of the specified bean.
Parameters:
  target - the target bean
Parameters:
  name - the Bean property name
Parameters:
  value - the new property value



setBeanProperty
protected void setBeanProperty(Object target, String name, Object value, Class stopClass) throws IllegalAccessException, InvocationTargetException(Code)
Sets a Bean property of the specified bean.
Parameters:
  target - the target bean
Parameters:
  name - the Bean property name
Parameters:
  value - the new property value
Parameters:
  stopClass - the Introspector's "stopClass"



setElement
public static void setElement(Object target, Object key, Object value, Context context)(Code)
This method is called by the syntax "target[key] = value"



setExitHook
public static void setExitHook(Context context, PnutsFunction func)(Code)



setLine
protected static void setLine(Context context, int beginLine, int beginColumn)(Code)
Set line number information for error reporting



setLine
public static void setLine(Context context, int line)(Code)



setPackage
protected static void setPackage(Package pkg, Context context)(Code)



setRange
public static Object setRange(Object target, Object idx1, Object idx2, Object expr, Context context)(Code)
This method is called by the syntax "id[from..to] = sth"



setThreadContext
public static void setThreadContext(Context context)(Code)
Gets the context bound to the current thread
Parameters:
  context - the context



setupPropertyChangeListeners
protected static void setupPropertyChangeListeners(Map table, Context context)(Code)
public static String unparseNode(SimpleNode node){ StringBuffer sbuf = new StringBuffer(); node.accept(new org.pnuts.lang.UnparseVisitor(sbuf), null); return sbuf.toString(); }



shiftArithmetic
public static Object shiftArithmetic(Object n1, Object n2)(Code)
>>> operation



shiftArithmetic
final protected static Object shiftArithmetic(Object n1, Object n2, Context context)(Code)



shiftLeft
final public static Object shiftLeft(Object n1, Object n2)(Code)
< < operation



shiftLeft
final protected static Object shiftLeft(Object n1, Object n2, Context context)(Code)



shiftRight
final public static Object shiftRight(Object n1, Object n2)(Code)
>> operation



shiftRight
final protected static Object shiftRight(Object n1, Object n2, Context context)(Code)



subtract
final public static Object subtract(Object n1, Object n2)(Code)
- operation



subtract
final protected static Object subtract(Object n1, Object n2, Context context)(Code)



subtract1
final public static Object subtract1(Object n)(Code)
Subtracts 1 from a object (integer)



subtract1
final protected static Object subtract1(Object n, Context context)(Code)



throwException
public static void throwException(Object arg, Context context)(Code)



toBoolean
public static Boolean toBoolean(Object param)(Code)
Convert a given object to a boolean value



toEnumeration
public static Enumeration toEnumeration(Object target, Context context)(Code)



toFunctionNode
protected static SimpleNode toFunctionNode(SimpleNode body)(Code)



transform
public static Object transform(Class type, Object obj)(Code)



transform
public static Object transform(Class type, Object obj, Context context)(Code)



unparse
public static String unparse(SimpleNode node, Context context)(Code)



watchProperty
protected static void watchProperty(Map table, Object obj, String property, Object memberTarget, String memberName, Callable rhs)(Code)



xor
final public static Object xor(Object n1, Object n2)(Code)
^ operation



xor
final protected static Object xor(Object n1, Object n2, Context context)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.