blob: dabba58f0c144ecbad95203be2e6f3a1c7a2a103 (
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
|
/*
* System.Reflection.Emit-like API for writing .NET assemblies to MSIL
*/
// $Id$
package ch.epfl.lamp.compiler.msil.emit
import ch.epfl.lamp.compiler.msil.Type
import ch.epfl.lamp.compiler.msil.ConstructorInfo
import ch.epfl.lamp.compiler.msil.ParameterInfo
import java.io.IOException
/**
* Creates or associates parameter information.
* Parameter attributes need to consistent with the method signature.
* If you specify Out attributes for a parameter, you should ensure that
* the type of that method parameter is a ByRef type
*
* @author Nikolay Mihaylov
* @version 1.0
*/
class ParameterBuilder(name: String, tpe: Type, attr: Int, pos: Int)
extends ParameterInfo(name, tpe, attr, pos)
with ICustomAttributeSetter
with Visitable
{
//##########################################################################
/** Sets a custom attribute. */
def SetCustomAttribute(constr: ConstructorInfo, value: Array[byte]) {
addCustomAttribute(constr, value)
}
//##########################################################################
/** The apply method for a visitor */
@throws(classOf[IOException])
def apply(v: Visitor) {
v.caseParameterBuilder(this)
}
//##########################################################################
}
|