Skip to content

Commit 62e49ae

Browse files
committed
PHPDoc追加
1 parent dad3ecd commit 62e49ae

10 files changed

+46
-3
lines changed

PHPJava/Statements/JavaStatement_aaload.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
class JavaStatement_aaload extends JavaStatement {
44

5+
/**
6+
* load onto the stack a reference from an array
7+
*/
58
public function execute () {
69

710
$index = $this->getStack();

PHPJava/Statements/JavaStatement_aastore.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
class JavaStatement_aastore extends JavaStatement {
44

5+
/**
6+
* store into a reference in an array
7+
*/
58
public function execute () {
69

710
throw new JavaStatementException(__CLASS__ . ' hasnot statement.');

PHPJava/Statements/JavaStatement_aconst_null.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22

33
class JavaStatement_aconst_null extends JavaStatement {
44

5+
/**
6+
* store into a reference in an array
7+
*/
58
public function execute () {
6-
7-
throw new JavaStatementException(__CLASS__ . ' hasnot statement.');
89

10+
$this->pushStack(null);
11+
912
}
1013

1114
}

PHPJava/Statements/JavaStatement_aload.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
class JavaStatement_aload extends JavaStatement {
44

5+
/**
6+
* load a reference onto the stack from a local variable #index
7+
*/
58
public function execute () {
69

710
$index = $this->getByteCodeStream()->readByte();

PHPJava/Statements/JavaStatement_aload_0.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
class JavaStatement_aload_0 extends JavaStatement {
44

5+
/**
6+
* load a reference onto the stack from local variable 0
7+
*/
58
public function execute () {
69

710
$this->pushStack($this->getLocalstorage(0));

PHPJava/Statements/JavaStatement_aload_1.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
class JavaStatement_aload_1 extends JavaStatement {
44

5+
/**
6+
* load a reference onto the stack from local variable 1
7+
*/
58
public function execute () {
69

710
$this->pushStack($this->getLocalstorage(1));

PHPJava/Statements/JavaStatement_aload_2.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
class JavaStatement_aload_2 extends JavaStatement {
44

5+
/**
6+
* load a reference onto the stack from local variable 2
7+
*/
58
public function execute () {
69

710
$this->pushStack($this->getLocalstorage(2));

PHPJava/Statements/JavaStatement_aload_3.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
class JavaStatement_aload_3 extends JavaStatement {
44

5+
/**
6+
* load a reference onto the stack from local variable 3
7+
*/
58
public function execute () {
69

710
$this->pushStack($this->getLocalstorage(3));

PHPJava/Statements/JavaStatement_anewarray.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,21 @@
22

33
class JavaStatement_anewarray extends JavaStatement {
44

5+
/**
6+
* create a new array of references of length count and component
7+
* type identified by the class reference index (indexbyte1 << 8 + indexbyte2)
8+
* in the constant pool
9+
*/
510
public function execute () {
611

7-
throw new JavaStatementException(__CLASS__ . ' hasnot statement.');
12+
// 配列のサイズを調べる (PHPでは不要なので実行するだけ)
13+
$this->getByteCodeStream()->readUnsignedShort();
14+
15+
// 配列の数を読み込む (これもPHPでは不要なのでスルー)
16+
$this->getStack();
17+
18+
// 空の配列を渡す
19+
$this->pushStack(array());
820

921
}
1022

test.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,13 @@ public static void main (String[] args) {
108108
System.out.println("ぬるぷっぷー");
109109

110110
}
111+
112+
String[] test = {"1", "2", "3"};
113+
for (String i : test) {
114+
115+
System.out.println(i);
116+
117+
}
111118

112119
}
113120

0 commit comments

Comments
 (0)