Java Doc for Function.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.Function

Function
public class Function extends Runtime implements Serializable(Code)
This class represents a function with a certain number of parameters. In Pnuts, functions should be accessed through PnutsFunction. This class is used mainly by compiler implementors. Note that there is no way to create a Function object through public API.


Field Summary
 booleananonymous
    
protected  Configurationconfig
    
protected transient  Objectfile
    
 booleanfinallySet
    
protected  StringfuncName
    
protected  PnutsFunctionfunction
    
protected  ImportEnvimportEnv
    
 SymbolTablelexicalScope
    
protected  Stringlocals
    
protected  ModuleListmoduleList
    
protected  Stringname
    
protected  intnargs
    
protected  SimpleNodenode
    
protected  Functionouter
    
protected transient  Packagepkg
    
protected  StringpkgName
    
final static  longserialVersionUID
    
protected  booleanvarargs
    

Constructor Summary
protected  Function()
    
 Function(Function func)
    
protected  Function(String func, String[] locals, int nargs, SimpleNode node, Package pkg, Context context)
    
protected  Function(String func, String[] locals, int nargs, boolean varargs, SimpleNode node, Package pkg, Context context)
    

Method Summary
protected  Objectaccept(Visitor visitor, Context context)
    
protected  Objectexec(Object[] args, Context context)
    
public  String[]getImportEnv()
    
public synchronized  StringgetName()
    
protected  SimpleNodegetNode()
    
public  intgetNumberOfParameter()
    
public  PackagegetPackage()
    
public  ObjectgetScriptSource()
    
 StringparamString()
    
 voidreadAttributes(ObjectInputStream s)
    
protected  PnutsFunctionregister(PnutsFunction pf)
    
protected  PnutsFunctionregister(PnutsFunction pf, boolean isChild)
    
public  voidsetPackage(Package pkg)
    
public  StringtoString()
    
protected  Stringunparse(Context context)
    
 voidwriteAttributes(ObjectOutputStream s)
    

Field Detail
anonymous
boolean anonymous(Code)



config
protected Configuration config(Code)



file
protected transient Object file(Code)
file name in which this function is defined



finallySet
boolean finallySet(Code)



funcName
protected String funcName(Code)
name of the function including the scope information



function
protected PnutsFunction function(Code)
reference to PnutsFunction



importEnv
protected ImportEnv importEnv(Code)
"import" environment



lexicalScope
SymbolTable lexicalScope(Code)



locals
protected String locals(Code)
local parameters



moduleList
protected ModuleList moduleList(Code)
Used modules



name
protected String name(Code)
name of the function without the scope information



nargs
protected int nargs(Code)
the number of arguments



node
protected SimpleNode node(Code)
reference to the definition



outer
protected Function outer(Code)
reference to the outer function



pkg
protected transient Package pkg(Code)



pkgName
protected String pkgName(Code)
the package name in which this function is defined



serialVersionUID
final static long serialVersionUID(Code)



varargs
protected boolean varargs(Code)
variable length arugments




Constructor Detail
Function
protected Function()(Code)



Function
Function(Function func)(Code)



Function
protected Function(String func, String[] locals, int nargs, SimpleNode node, Package pkg, Context context)(Code)



Function
protected Function(String func, String[] locals, int nargs, boolean varargs, SimpleNode node, Package pkg, Context context)(Code)




Method Detail
accept
protected Object accept(Visitor visitor, Context context)(Code)



exec
protected Object exec(Object[] args, Context context)(Code)



getImportEnv
public String[] getImportEnv()(Code)



getName
public synchronized String getName()(Code)
Returns the name of the function



getNode
protected SimpleNode getNode()(Code)



getNumberOfParameter
public int getNumberOfParameter()(Code)
Returns the number of parameters



getPackage
public Package getPackage()(Code)



getScriptSource
public Object getScriptSource()(Code)



paramString
String paramString()(Code)



readAttributes
void readAttributes(ObjectInputStream s) throws IOException, ClassNotFoundException(Code)



register
protected PnutsFunction register(PnutsFunction pf)(Code)



register
protected PnutsFunction register(PnutsFunction pf, boolean isChild)(Code)



setPackage
public void setPackage(Package pkg)(Code)



toString
public String toString()(Code)



unparse
protected String unparse(Context context)(Code)



writeAttributes
void writeAttributes(ObjectOutputStream s) throws IOException(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.