Java Doc for PnutsImpl.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
      pnuts.lang.PnutsImpl

All known Subclasses:   pnuts.ext.CachedPnutsImpl,  pnuts.ext.PnutsImplAdapter,  pnuts.compiler.CompilerPnutsImpl,  pnuts.ext.ImplementationAdapter,
PnutsImpl
public class PnutsImpl extends Runtime implements Implementation(Code)
This class defines an abstract interface of script interpreter's implementation, It also gives the default implementation, which is a pure interpreter.
See Also:   pnuts.lang.Context.setImplementation(Implementation)
See Also:   pnuts.lang.Context.getImplementation


Field Summary
static  PnutsImpldefaultPnutsImpl
    
protected  Propertiesproperties
    


Method Summary
static  PnutsImpl_getInstance()
    
static  PnutsImpl_getInstance(String className)
    
static  PnutsImpl_getInstance(String className, Properties properties)
    
public  Objectaccept(SimpleNode node, Context context)
    
protected  ObjectacceptNode(SimpleNode node, Context context)
    
public  Objecteval(String expr, Context context)
    
public static  PnutsImplgetDefault()
    
static  PnutsImplgetDefault(Properties properties)
    
public  Objectload(String file, Context context)
    
public  Objectload(URL scriptURL, Context context)
    
public  ObjectloadFile(String filename, Context context)
    
protected  voidpopFile(Context context)
     Tell the context that the current script file has been completed.
protected  voidprovide(String file, Context context)
    
protected  voidpushFile(Object file, Context context)
     Tell the context that it's started processing the script file.
public  StringqueryProperty(String key)
    
protected  voidrevoke(String file, Context context)
    
public  voidsetProperties(Properties properties)
    
public  voidsetProperty(String key, String value)
    

Field Detail
defaultPnutsImpl
static PnutsImpl defaultPnutsImpl(Code)



properties
protected Properties properties(Code)





Method Detail
_getInstance
static PnutsImpl _getInstance()(Code)



_getInstance
static PnutsImpl _getInstance(String className)(Code)



_getInstance
static PnutsImpl _getInstance(String className, Properties properties)(Code)



accept
public Object accept(SimpleNode node, Context context)(Code)



acceptNode
protected Object acceptNode(SimpleNode node, Context context)(Code)



eval
public Object eval(String expr, Context context)(Code)
Evaluate an expreesion
Parameters:
  expr - the expression to be evaluated
Parameters:
  context - the context in which the expression is evaluated the result of the evaluation



getDefault
public static PnutsImpl getDefault()(Code)
Returns the default PnutsImpl object the default PnutsImpl object



getDefault
static PnutsImpl getDefault(Properties properties)(Code)



load
public Object load(String file, Context context) throws FileNotFoundException(Code)
Load a script file using classloader
Parameters:
  file - the name of the script
Parameters:
  context - the context in which the script is executed the result of the evaluation



load
public Object load(URL scriptURL, Context context)(Code)
Load a script file from a URL
Parameters:
  scriptURL - the URL of the script
Parameters:
  context - the context in which the script is executed the result of the evaluation



loadFile
public Object loadFile(String filename, Context context) throws FileNotFoundException(Code)
Load a script file from local file system
Parameters:
  filename - the file name of the script
Parameters:
  context - the context in which the expression is evaluated the result of the evaluation



popFile
protected void popFile(Context context)(Code)
Tell the context that the current script file has been completed.



provide
protected void provide(String file, Context context)(Code)



pushFile
protected void pushFile(Object file, Context context)(Code)
Tell the context that it's started processing the script file.



queryProperty
public String queryProperty(String key)(Code)



revoke
protected void revoke(String file, Context context)(Code)



setProperties
public void setProperties(Properties properties)(Code)



setProperty
public void setProperty(String key, String value)(Code)



Fields inherited from pnuts.lang.Runtime
final protected static String BOOLEAN_SYMBOL(Code)(Java Doc)
final protected static String BYTE_SYMBOL(Code)(Java Doc)
final protected static String CHAR_SYMBOL(Code)(Java Doc)
final protected static String CLONE(Code)(Java Doc)
final protected static String DOUBLE_SYMBOL(Code)(Java Doc)
final protected static String EXCEPTOIN_FIELD_SYMBOL(Code)(Java Doc)
final protected static String FLOAT_SYMBOL(Code)(Java Doc)
final protected static String INT_SYMBOL(Code)(Java Doc)
final protected static String LONG_SYMBOL(Code)(Java Doc)
final protected static Object[] NO_PARAM(Code)(Java Doc)
final protected static String SHORT_SYMBOL(Code)(Java Doc)
final protected static String VOID_SYMBOL(Code)(Java Doc)
protected Cache fieldCache(Code)(Java Doc)
static FunctionSerializer functionSerializer(Code)(Java Doc)
static ThreadLocal threadContext(Code)(Java Doc)

Methods inherited from pnuts.lang.Runtime
protected Object _callConstructor(Context context, Class c, Object args, Class types)(Code)(Java Doc)
protected Object _callMethod(Context context, Class c, String name, Object args, Class types, Object target)(Code)(Java Doc)
protected Object _getField(Context context, Class c, String name, Object target)(Code)(Java Doc)
protected void _putField(Context context, Class cls, String name, Object target, Object value)(Code)(Java Doc)
final public static Object add(Object n1, Object n2)(Code)(Java Doc)
final protected static Object add(Object n1, Object n2, Context context)(Code)(Java Doc)
final public static Object add1(Object n)(Code)(Java Doc)
final protected static Object add1(Object n, Context context)(Code)(Java Doc)
public static void addImport(Context context, String name)(Code)(Java Doc)
public static void addStaticMembers(Context context, String name, boolean wildcard)(Code)(Java Doc)
final public static Object and(Object n1, Object n2)(Code)(Java Doc)
final protected static Object and(Object n1, Object n2, Context context)(Code)(Java Doc)
public static Object applyGenerator(Generator g, PnutsFunction closure, Context context)(Code)(Java Doc)
public static Class arrayType(Class c, int dim)(Code)(Java Doc)
protected static int arraydim(Object o)(Code)(Java Doc)
final public static Object call(Context context, Object target, Object[] args, Class[] casts)(Code)(Java Doc)
final public static Object call(Context context, Object target, Object[] args, Class[] casts, int line, int column)(Code)(Java Doc)
public static Object callConstructor(Context context, Class c, Object args, Class types)(Code)(Java Doc)
final protected static Object callFunction(Context context, PnutsFunction func, Object[] args)(Code)(Java Doc)
public static Object callMethod(Context context, Class c, String name, Object args, Class types, Object target)(Code)(Java Doc)
public static Object cast(Context context, Class type, Object object, boolean flag)(Code)(Java Doc)
protected static void catchException(Class type, PnutsFunction func, Context context)(Code)(Java Doc)
protected static void checkException(Context context, Throwable throwable)(Code)(Java Doc)
protected static void checkException(Context context, Throwable throwable, TypeMap tmap)(Code)(Java Doc)
static int compareArrays(Object a1, Object a2)(Code)(Java Doc)
static int compareListToArray(List ol, Object array)(Code)(Java Doc)
static int compareLists(List ol1, List ol2)(Code)(Java Doc)
public static int compareObjects(Object e1, Object e2)(Code)(Java Doc)
final public static int compareTo(Object n1, Object n2)(Code)(Java Doc)
final protected static int compareTo(Object n1, Object n2, Context context)(Code)(Java Doc)
static Number compress(Number n)(Code)(Java Doc)
public static Cache createCache()(Code)(Java Doc)
protected static List createList(Context context)(Code)(Java Doc)
protected static Map createMap(int size, Context context)(Code)(Java Doc)
public static Map createWeakMap()(Code)(Java Doc)
static Number decimalNumber(String s, int radix)(Code)(Java Doc)
protected static PnutsFunction defineTopLevelFunction(Function f, String symbol, Package pkg, Context context)(Code)(Java Doc)
protected static PnutsFunction defineUnboundFunction(Function f, String symbol, Package pkg)(Code)(Java Doc)
static void deserializePnutsFunction(PnutsFunction pnutsFunction, ObjectInputStream s) throws IOException, ClassNotFoundException(Code)(Java Doc)
final public static Object divide(Object n1, Object n2)(Code)(Java Doc)
final protected static Object divide(Object n1, Object n2, Context context)(Code)(Java Doc)
final public static boolean eq(Object n1, Object n2)(Code)(Java Doc)
final protected static boolean eq(Object n1, Object n2, Context context)(Code)(Java Doc)
protected static void escape(Object v)(Code)(Java Doc)
protected Object exec(Context context)(Code)(Java Doc)
public Object execute(Context context)(Code)(Java Doc)
public static URL fileToURL(File file) throws IOException(Code)(Java Doc)
protected static Method findCallableMethod(Class clazz, String name, Class args)(Code)(Java Doc)
public static String format(Object object, int maxArrayLength)(Code)(Java Doc)
public static String format(Object object, int maxArrayLength, int maxFormatSize)(Code)(Java Doc)
public static String format(Object object, int maxArrayLength, int maxFormatSize, char[] paren)(Code)(Java Doc)
static void format(Object object, int maxArrayLength, int maxFormatSize, char[] paren, Set formattedObjects, StringBuffer sb)(Code)(Java Doc)
static void formatElement(Object obj, int maxArrayLength, int maxFormatSize, char[] paren, Set formattedObjects, StringBuffer sb)(Code)(Java Doc)
final public static boolean ge(Object n1, Object n2)(Code)(Java Doc)
final protected static boolean ge(Object n1, Object n2, Context context)(Code)(Java Doc)
final public static int getArrayLength(Object array)(Code)(Java Doc)
public static Object getBeanProperty(Context context, Object target, String name)(Code)(Java Doc)
public Object getBeanProperty(Object target, String name) throws IllegalAccessException, InvocationTargetException(Code)(Java Doc)
protected Object getBeanProperty(Object target, String name, Class stopClass) throws IllegalAccessException, InvocationTargetException(Code)(Java Doc)
public Class getBeanPropertyType(Class cls, String name)(Code)(Java Doc)
protected static int getBeginColumn(Context context)(Code)(Java Doc)
protected static int getBeginLine(Context context)(Code)(Java Doc)
public static boolean getBoolean(String key)(Code)(Java Doc)
public static Class getBottomType(Class clazz)(Code)(Java Doc)
static String getClassName(Class cls)(Code)(Java Doc)
public static Executable getCompiledScript(String name, Context context)(Code)(Java Doc)
protected static Constructor[] getConstructors(Context context, Class cls)(Code)(Java Doc)
static ImportEnv getDefaultImports(Context context)(Code)(Java Doc)
public static Runtime getDefaultRuntime()(Code)(Java Doc)
public static Object getElement(Object target, Object key, Context context)(Code)(Java Doc)
public static Object getElementAt(Object target, int idx, Context context)(Code)(Java Doc)
protected static int getEndLine(Context context)(Code)(Java Doc)
public static Object getField(Context context, Object target, String name)(Code)(Java Doc)
protected Field getField(Class cls, String name)(Code)(Java Doc)
protected static Function getFunction(PnutsFunction pf, int nargs)(Code)(Java Doc)
protected static Function getFunction(Context context)(Code)(Java Doc)
protected static Enumeration getFunctions(PnutsFunction pf)(Code)(Java Doc)
protected static String getMessage(String bundleName, String key, Object a)(Code)(Java Doc)
protected static Method[] getMethods(Context context, Class cls)(Code)(Java Doc)
public static String getProperty(String key)(Code)(Java Doc)
public static Object getRange(Object target, Object idx1, Object idx2, Context context)(Code)(Java Doc)
protected static Runtime getRuntime(Context context)(Code)(Java Doc)
public static Reader getScriptReader(InputStream in, Context context)(Code)(Java Doc)
protected static Object getScriptSource(Context context)(Code)(Java Doc)
public static URL getScriptURL(String name, Context context)(Code)(Java Doc)
public static Object getStaticField(Context context, Class clazz, String name)(Code)(Java Doc)
public static Context getThreadContext()(Code)(Java Doc)
final public static boolean gt(Object n1, Object n2)(Code)(Java Doc)
final protected static boolean gt(Object n1, Object n2, Context context)(Code)(Java Doc)
final public static boolean isArray(Object obj)(Code)(Java Doc)
public static boolean isGenerator(SimpleNode node)(Code)(Java Doc)
protected static void jump(Object v)(Code)(Java Doc)
final public static boolean le(Object n1, Object n2)(Code)(Java Doc)
final protected static boolean le(Object n1, Object n2, Context context)(Code)(Java Doc)
public static SimpleNode loadNode(String str)(Code)(Java Doc)
static Object lookupTopLevelValue(String symbol, Context context)(Code)(Java Doc)
final public static boolean lt(Object n1, Object n2)(Code)(Java Doc)
final protected static boolean lt(Object n1, Object n2, Context context)(Code)(Java Doc)
protected static Object makeArray(Object[] parameters, Context context)(Code)(Java Doc)
protected static int matchType(Class type, Object obj)(Code)(Java Doc)
final public static Object mod(Object n1, Object n2)(Code)(Java Doc)
final protected static Object mod(Object n1, Object n2, Context context)(Code)(Java Doc)
final public static Object multiply(Object n1, Object n2)(Code)(Java Doc)
final protected static Object multiply(Object n1, Object n2, Context context)(Code)(Java Doc)
final public static boolean ne(Object n1, Object n2)(Code)(Java Doc)
final protected static boolean ne(Object n1, Object n2, Context context)(Code)(Java Doc)
final public static Object negate(Object n)(Code)(Java Doc)
final protected static Object negate(Object n, Context context)(Code)(Java Doc)
protected static Object newInstance(Context context, Class c, Object[] args, Class[] casts)(Code)(Java Doc)
final public static Object not(Object n)(Code)(Java Doc)
final protected static Object not(Object n, Context context)(Code)(Java Doc)
final public static Object or(Object n1, Object n2)(Code)(Java Doc)
final protected static Object or(Object n1, Object n2, Context context)(Code)(Java Doc)
public static Character parseChar(String str) throws ParseException(Code)(Java Doc)
public static Object[] parseFloat(String str)(Code)(Java Doc)
public static Object[] parseInt(String str) throws ParseException(Code)(Java Doc)
static Object[] parseInt(String str, int radix, boolean shrink) throws ParseException(Code)(Java Doc)
public static String parseString(String str, int offset) throws ParseException(Code)(Java Doc)
public static Object primitive(Context context, Class primitiveType, Object param, boolean flag)(Code)(Java Doc)
static Object primitive(Class primitiveType, Object param, boolean flag, int radix)(Code)(Java Doc)
public static void printError(Throwable t, Context context)(Code)(Java Doc)
public static void putField(Context context, Object target, String name, Object expr)(Code)(Java Doc)
public static void putStaticField(Context context, Class clazz, String name, Object expr)(Code)(Java Doc)
public static Object quantity(Number number, String numberString, String unit, Context context)(Code)(Java Doc)
static void recoverParseError(PnutsParser parser, int tokenType)(Code)(Java Doc)
public static String replaceChar(String str, Number n, Object expr)(Code)(Java Doc)
public Object run(Context context)(Code)(Java Doc)
public static String saveNode(SimpleNode node)(Code)(Java Doc)
static void serializePnutsFunction(PnutsFunction pnutsFunction, ObjectOutputStream s) throws IOException(Code)(Java Doc)
public static void setBeanProperty(Context context, Object target, String name, Object value)(Code)(Java Doc)
public void setBeanProperty(Object target, String name, Object value) throws IllegalAccessException, InvocationTargetException(Code)(Java Doc)
protected void setBeanProperty(Object target, String name, Object value, Class stopClass) throws IllegalAccessException, InvocationTargetException(Code)(Java Doc)
public static void setElement(Object target, Object key, Object value, Context context)(Code)(Java Doc)
public static void setExitHook(Context context, PnutsFunction func)(Code)(Java Doc)
protected static void setLine(Context context, int beginLine, int beginColumn)(Code)(Java Doc)
public static void setLine(Context context, int line)(Code)(Java Doc)
protected static void setPackage(Package pkg, Context context)(Code)(Java Doc)
public static Object setRange(Object target, Object idx1, Object idx2, Object expr, Context context)(Code)(Java Doc)
public static void setThreadContext(Context context)(Code)(Java Doc)
protected static void setupPropertyChangeListeners(Map table, Context context)(Code)(Java Doc)
public static Object shiftArithmetic(Object n1, Object n2)(Code)(Java Doc)
final protected static Object shiftArithmetic(Object n1, Object n2, Context context)(Code)(Java Doc)
final public static Object shiftLeft(Object n1, Object n2)(Code)(Java Doc)
final protected static Object shiftLeft(Object n1, Object n2, Context context)(Code)(Java Doc)
final public static Object shiftRight(Object n1, Object n2)(Code)(Java Doc)
final protected static Object shiftRight(Object n1, Object n2, Context context)(Code)(Java Doc)
final public static Object subtract(Object n1, Object n2)(Code)(Java Doc)
final protected static Object subtract(Object n1, Object n2, Context context)(Code)(Java Doc)
final public static Object subtract1(Object n)(Code)(Java Doc)
final protected static Object subtract1(Object n, Context context)(Code)(Java Doc)
public static void throwException(Object arg, Context context)(Code)(Java Doc)
public static Boolean toBoolean(Object param)(Code)(Java Doc)
public static Enumeration toEnumeration(Object target, Context context)(Code)(Java Doc)
protected static SimpleNode toFunctionNode(SimpleNode body)(Code)(Java Doc)
public static Object transform(Class type, Object obj)(Code)(Java Doc)
public static Object transform(Class type, Object obj, Context context)(Code)(Java Doc)
public static String unparse(SimpleNode node, Context context)(Code)(Java Doc)
protected static void watchProperty(Map table, Object obj, String property, Object memberTarget, String memberName, Callable rhs)(Code)(Java Doc)
final public static Object xor(Object n1, Object n2)(Code)(Java Doc)
final protected static Object xor(Object n1, Object n2, Context context)(Code)(Java Doc)

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.