blob: f904fa6b92050ae70ad76c1d90c650e3c9d7d6a0 (
plain) (
blame)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
/* ____ ____ ____ ____ ______ *\
** / __// __ \/ __// __ \/ ____/ SOcos COmpiles Scala **
** __\_ \/ /_/ / /__/ /_/ /\_ \ (c) 2002, LAMP/EPFL **
** /_____/\____/\___/\____/____/ **
\* */
// $Id$
package scalac.atree;
import scalac.symtab.Symbol;
import scalac.symtab.Type;
/** This class represents an attributed method. */
public class AMethod extends AMember {
//########################################################################
// Public Fields
/** Contains the Intermediate code of this Method */
public Object icode = null;
//########################################################################
// Public Constructors
/** Initializes this instance. */
public AMethod(Symbol symbol, boolean isStatic) {
super(symbol, isStatic);
}
//########################################################################
// Public Methods
/** Is this method final? */
public boolean isFinal() {
return symbol().isMethodFinal();
}
/** Is this method synchronized? */
public boolean isSynchronized() {
return false; // !!!
}
/** Is this method native? */
public boolean isNative() {
return false; // !!!
}
/** Is this method abstract? */
public boolean isAbstract() {
return symbol().isDeferred();
}
/** Is this method FP-strict? */
public boolean isStrictFP() {
return false; // !!!
}
/** Returns the type parameters of this method. */
public Symbol[] tparams() {
return symbol().type().typeParams();
}
/** Returns the value parameters of this method. */
public Symbol[] vparams() {
return symbol().type().valueParams();
}
/** Returns the result type of this method. */
public Type result() {
return symbol().type().resultType();
}
/** Returns a string representation of this method. */
public String toString() {
return new ATreePrinter().printMethod(this).toString();
}
//########################################################################
}
|