diff options
author | paltherr <paltherr@epfl.ch> | 2003-11-05 16:31:19 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2003-11-05 16:31:19 +0000 |
commit | 70245d69240b1de543dc644ea2fd29008eb74112 (patch) | |
tree | 26e5aed403b31ff5acccfc3b0d4feacdd761d127 /sources/scalac/atree/AMethod.java | |
parent | bdaca266612e6b878379253d57358ce672953e52 (diff) | |
download | scala-70245d69240b1de543dc644ea2fd29008eb74112.tar.gz scala-70245d69240b1de543dc644ea2fd29008eb74112.tar.bz2 scala-70245d69240b1de543dc644ea2fd29008eb74112.zip |
- Added atree/AClass.java
- Added atree/AField.java
- Added atree/AMember.java
- Added atree/AMethod.java
- Added atree/ARepository.java
Diffstat (limited to 'sources/scalac/atree/AMethod.java')
-rw-r--r-- | sources/scalac/atree/AMethod.java | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/sources/scalac/atree/AMethod.java b/sources/scalac/atree/AMethod.java new file mode 100644 index 0000000000..332f2284d4 --- /dev/null +++ b/sources/scalac/atree/AMethod.java @@ -0,0 +1,74 @@ +/* ____ ____ ____ ____ ______ *\ +** / __// __ \/ __// __ \/ ____/ 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 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(); + } + + //######################################################################## +} |