J/Invoke、大方実装完了
java.lang.System.out.println() の呼び出し
ku> juse: "java.lang" local; > System.out println: "Hello world"; > Hello world
java.awt.Frame を使ってみる
ku> juse: "java.awt" local; > juse: "java.awt.event" local; > window = jnew: Frame "SampleFrame"; > window setSize: 320 240; > listener = jnew: WindowListener; > listener.forward = null; > listener.windowClosing = !(window dispose); > window addWindowListener: listener; > window show; >
おまけ:↑を実行した後の local オブジェクトのダンプ
ku> local pp; > #object: 11f2ee1 { AWTError = #object: 3ecfff; AWTEvent = #object: 1c99159; AWTEventListener = #object: 65a77f; AWTEventListenerProxy = #object: 1d7ad1c; AWTEventMulticaster = #object: a61164; AWTException = #object: bfc8e0; AWTKeyStroke = #object: 11d0a4f; AWTPermission = #object: 18fd984; AbstractMethodError = #object: 111a775; ActionEvent = #object: 91cee; ActionListener = #object: 4a63d8; ActiveEvent = #object: 1e0ff2f; Adjustable = #object: 9173ef; AdjustmentEvent = #object: 152513a; AdjustmentListener = #object: 152c4d9; AlphaComposite = #object: f99ff5; Appendable = #object: 74c3aa; ArithmeticException = #object: 1d9fd51; ArrayIndexOutOfBoundsException = #object: 860d49; ArrayStoreException = #object: d251a3; AssertionError = #object: 1edc073; BasicStroke = #object: 1f5d386; Boolean = #object: 121f1d; BorderLayout = #object: 1b8e059; BufferCapabilities = #object: 910040; BufferCapabilities$FlipContents = #object: 1a786c3; Button = #object: 18088c0; Byte = #object: 1922221; Canvas = #object: fec107; CardLayout = #object: 132e13d; CharSequence = #object: 1617189; Character = #object: 64f6cd; Character$Subset = #object: 872380; Character$UnicodeBlock = #object: 2bb514; Checkbox = #object: 17d5d2a; CheckboxGroup = #object: 16fa474; CheckboxMenuItem = #object: 95c083; Choice = #object: 191d8c1; Class = #object: 2d9c06; ClassCastException = #object: 5e5a50; ClassCircularityError = #object: 7b6889; ClassFormatError = #object: c2ff5; ClassLoader = #object: 20be79; ClassNotFoundException = #object: 1b9240e; CloneNotSupportedException = #object: 1ee4648; Cloneable = #object: 482923; Color = #object: 184ec44; Comparable = #object: 1b383e9; Compiler = #object: 99681b; Component = #object: 181edf4; Component$BaselineResizeBehavior = #object: 12d3205; ComponentAdapter = #object: 2f1921; ComponentEvent = #object: 1adc30; ComponentListener = #object: 16df84b; ComponentOrientation = #object: c832d2; Composite = #object: 1808199; CompositeContext = #object: 1bc887b; Container = #object: a46701; ContainerAdapter = #object: 166a22b; ContainerEvent = #object: 120cc56; ContainerListener = #object: 47393f; ContainerOrderFocusTraversalPolicy = #object: 1ff7a1e; Cursor = #object: 1aa57fb; DefaultFocusTraversalPolicy = #object: 763f5d; DefaultKeyboardFocusManager = #object: 13a317a; Deprecated = #object: 186768e; Desktop = #object: d19bc8; Desktop$Action = #object: 14a8cd1; Dialog = #object: 1630ab9; Dialog$ModalExclusionType = #object: 1551f60; Dialog$ModalityType = #object: 17ee8b8; Dimension = #object: e0b6f5; DisplayMode = #object: 10bc49d; Double = #object: 1995d80; Enum = #object: 1c9b9ca; EnumConstantNotPresentException = #object: c4aad3; Error = #object: 1ab28fe; Event = #object: 105738; EventFilter$FilterAction = #object: ce5b1c; EventQueue = #object: 1bfc93a; Exception = #object: 341960; ExceptionInInitializerError = #object: 6e293a; FileDialog = #object: 54a328; Float = #object: a3d4cf; FlowLayout = #object: 1e8a1f6; FocusAdapter = #object: 1e152c5; FocusEvent = #object: 1319c; FocusListener = #object: 6025e7; FocusTraversalPolicy = #object: 587c94; Font = #object: 15b0afd; FontFormatException = #object: 2e7820; FontMetrics = #object: d08633; Frame = #object: 1a9334; GradientPaint = #object: b64435; Graphics = #object: 37fb1e; Graphics2D = #object: 1479feb; GraphicsConfigTemplate = #object: 1543c88; GraphicsConfiguration = #object: 15212bc; GraphicsDevice = #object: 14c1103; GraphicsEnvironment = #object: f11404; GridBagConstraints = #object: 1592174; GridBagLayout = #object: a352a5; GridBagLayoutInfo = #object: 86fe26; GridLayout = #object: 97a560; HeadlessException = #object: 1ea5671; HierarchyBoundsAdapter = #object: 1d15445; HierarchyBoundsListener = #object: 1f3aa07; HierarchyEvent = #object: 1fc2fb; HierarchyListener = #object: 139eeda; IllegalAccessError = #object: 704baa; IllegalAccessException = #object: 77a7f9; IllegalArgumentException = #object: 1b4fad5; IllegalComponentStateException = #object: bfea1d; IllegalMonitorStateException = #object: 1a33d48; IllegalStateException = #object: c68c3; IllegalThreadStateException = #object: b2002f; Image = #object: 2a4983; ImageCapabilities = #object: 406199; IncompatibleClassChangeError = #object: c7b00c; IndexOutOfBoundsException = #object: 1f6f296; InheritableThreadLocal = #object: 1b09468; InputEvent = #object: 1df5a8f; InputMethodEvent = #object: b2a2d8; InputMethodListener = #object: 1e13d52; Insets = #object: 80fa6f; InstantiationError = #object: 1b9ce4b; InstantiationException = #object: 196c1b0; Integer = #object: 861f24; InternalError = #object: 166aa18; InterruptedException = #object: 1292d26; InvocationEvent = #object: 5329c5; ItemEvent = #object: 1db699b; ItemListener = #object: 1f26605; ItemSelectable = #object: 107ebe1; Iterable = #object: 10f11b8; JobAttributes = #object: 544ec1; JobAttributes$DefaultSelectionType = #object: fe748f; JobAttributes$DestinationType = #object: 1968e23; JobAttributes$DialogType = #object: 14da8f4; JobAttributes$MultipleDocumentHandlingType = #object: 18f6235; JobAttributes$SidesType = #object: 78a212; KeyAdapter = #object: 1d85f79; KeyEvent = #object: 641e9a; KeyEventDispatcher = #object: 115273a; KeyEventPostProcessor = #object: 1c282a1; KeyListener = #object: 10e3293; KeyboardFocusManager = #object: 11a64ed; Label = #object: 1d80e6d; LayoutManager = #object: 19b5393; LayoutManager2 = #object: 8bdcd2; LinearGradientPaint = #object: 4e79f1; LinkageError = #object: 27e353; List = #object: bd928a; Long = #object: 1dfc547; Math = #object: 10f6d3; MediaTracker = #object: 1bcc0bc; Menu = #object: 111a3a4; MenuBar = #object: 10e790c; MenuComponent = #object: 12d263f; MenuContainer = #object: 12a0f6c; MenuItem = #object: 5a9de6; MenuShortcut = #object: 134a7d8; MouseAdapter = #object: 1f78ef1; MouseEvent = #object: 1c9a690; MouseInfo = #object: 1d6776d; MouseListener = #object: 13ad085; MouseMotionAdapter = #object: 4fce71; MouseMotionListener = #object: 17a8a02; MouseWheelEvent = #object: 1faba46; MouseWheelListener = #object: 1db7df8; MultipleGradientPaint = #object: 12b3d53; MultipleGradientPaint$ColorSpaceType = #object: 1c74f37; MultipleGradientPaint$CycleMethod = #object: 21b220; NegativeArraySizeException = #object: 3570b0; NoClassDefFoundError = #object: 79717e; NoSuchFieldError = #object: 10a2d64; NoSuchFieldException = #object: 12a3722; NoSuchMethodError = #object: 89cf1e; NoSuchMethodException = #object: 17ce4e7; NullPointerException = #object: 982589; Number = #object: c88440; NumberFormatException = #object: 62937c; Object = #object: 1c0e45a; OutOfMemoryError = #object: cfec48; Override = #object: a17083; Package = #object: e1d5ea; PageAttributes = #object: a31e1b; PageAttributes$ColorType = #object: 10da5eb; PageAttributes$MediaType = #object: 1081d2e; PageAttributes$OrientationRequestedType = #object: 1b3f829; PageAttributes$OriginType = #object: 698403; PageAttributes$PrintQualityType = #object: 15a0305; Paint = #object: 7c4c51; PaintContext = #object: 765a16; PaintEvent = #object: 148bd3; Panel = #object: e80842; Point = #object: 17653ae; PointerInfo = #object: 16fe0f4; Polygon = #object: 19d0a1; PopupMenu = #object: d02b51; PrintGraphics = #object: cbf30e; PrintJob = #object: 1c247a0; Process = #object: 1ec6696; ProcessBuilder = #object: 1431340; RadialGradientPaint = #object: a4e2e3; Readable = #object: 12bb7e0; Rectangle = #object: 134f69a; RenderingHints = #object: 2a15cd; RenderingHints$Key = #object: fd68b1; Robot = #object: e45076; Runnable = #object: 15e9756; Runtime = #object: 121ab80; RuntimeException = #object: 1827284; RuntimePermission = #object: 12c7568; ScrollPane = #object: 1d009b4; ScrollPaneAdjustable = #object: 12d15a9; Scrollbar = #object: e91f5d; SecurityException = #object: 10a3b24; SecurityManager = #object: b0ce8f; Shape = #object: 1c92535; Short = #object: a9c09e; SplashScreen = #object: a4e743; StackOverflowError = #object: 4aeb52; StackTraceElement = #object: 9f671b; StrictMath = #object: 12a3793; String = #object: a6d51e; StringBuffer = #object: f1bb78; StringBuilder = #object: 4b035d; StringIndexOutOfBoundsException = #object: ca0115; Stroke = #object: d1fa5; SuppressWarnings = #object: 198a455; System = #object: 4cee32; SystemColor = #object: aa37a6; SystemTray = #object: 12b7eea; TextArea = #object: 99353f; TextComponent = #object: 76e369; TextEvent = #object: 14c194d; TextField = #object: 1112783; TextListener = #object: 1394894; TexturePaint = #object: 1cbfe9d; Thread = #object: 1b8f864; Thread$State = #object: bb7759; Thread$UncaughtExceptionHandler = #object: 1989f84; ThreadDeath = #object: 110c424; ThreadGroup = #object: 1bd2664; ThreadLocal = #object: 1238bd2; Throwable = #object: b0bad7; Toolkit = #object: ba9340; Transparency = #object: 1198891; TrayIcon = #object: 1551d7f; TrayIcon$MessageType = #object: 10382a9; TypeNotPresentException = #object: 17725c4; UnknownError = #object: 1506dc4; UnsatisfiedLinkError = #object: 15663a2; UnsupportedClassVersionError = #object: a761fe; UnsupportedOperationException = #object: 1126b07; VerifyError = #object: 30d082; VirtualMachineError = #object: c931fc; Void = #object: f0c0d3; Window = #object: 3820e; WindowAdapter = #object: 4f80d6; WindowEvent = #object: 193722c; WindowFocusListener = #object: 12cc95d; WindowListener = #object: 157fb52; WindowStateListener = #object: 134e4fb; }
こいつら全部 Class オブジェクトですw