github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

olabini / ioke

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 190
    • 25
  • Source
  • Commits
  • Network (25)
  • Issues (0)
  • Downloads (10)
  • Wiki (1)
  • Graphs
  • Tree: 0e20b49

click here to add a description

click here to add a homepage

  • Branches (4)
    • gh-pages
    • ikil
    • integration
    • master
  • Tags (10)
    • IOKEexit
    • IOKE_S_IKJ_0_2_0
    • IOKE_P_IKJ_0_4_0
    • IOKE_P_IKC_0_4_0
    • IOKE_P
    • IOKE_E_IKJ_0_3_1
    • IOKE_E_IKJ_0_3_0
    • IOKE_E_IKC_0_1_1
    • IOKE_E_IKC_0_1_0
    • IOKE0_IKJVM_0_1_0
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

ioke is a new language for the JVM, based on Io and other languages. — Read more

  cancel

http://ioke.org

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Add default arguments handler. 
melwin (author)
Sun Jan 18 15:32:45 -0800 2009
commit  0e20b492b8e057e9d2c006698deca02ebf8f45f7
tree    76e372495c6848f0b13bf8edc30daef90fbbca4d
parent  3f249e5db30e75133432339cef21c8b5b2acd956
ioke / src / main / ioke / lang / TypeCheckingJavaMethod.java src/main/ioke/lang/TypeCheckingJavaMethod.java
100644 53 lines (41 sloc) 1.715 kb
edit raw blame history
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package ioke.lang;
 
import ioke.lang.exceptions.ControlFlow;
 
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
 
public abstract class TypeCheckingJavaMethod extends JavaMethod {
    public static class WithNoArguments extends TypeCheckingJavaMethod {
        private static TypeCheckingArgumentsDefinition ARGUMENTS;
 
        public WithNoArguments(String name) {
            super(name);
            ARGUMENTS = TypeCheckingArgumentsDefinition.empty();
        }
 
        public WithNoArguments(String name, Object mimic) {
            super(name);
            ARGUMENTS = TypeCheckingArgumentsDefinition.emptyButReceiverMustMimic(mimic);
        }
 
        @Override
        public TypeCheckingArgumentsDefinition getArguments() {
            return ARGUMENTS;
        }
    }
   
    public TypeCheckingJavaMethod(String name) {
        super(name);
    }
 
    @Override
    public abstract TypeCheckingArgumentsDefinition getArguments();
 
    public Object activate(IokeObject self, Object on, List<Object> args,
            Map<String, Object> keywords, IokeObject context, IokeObject message) throws ControlFlow {
        return super.activate(self, context, message, on);
    }
 
    @Override
    public Object activate(IokeObject self, IokeObject context,
            IokeObject message, Object on) throws ControlFlow {
        List<Object> args = new ArrayList<Object>();
        Map<String, Object> keywords = new HashMap<String, Object>();
        Object receiver = getArguments().getValidatedArgumentsAndReceiver(
                context, message, on, args, keywords);
 
        return activate(self, receiver, args, keywords, context, message);
    }
}
 
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server