annotate graal/com.oracle.truffle.api.dsl/src/com/oracle/truffle/api/dsl/internal/DSLMetadata.java @ 16763:e6d15134ca86

Truffle-DSL: fixed formatting problems.
author Christian Humer <christian.humer@gmail.com>
date Mon, 11 Aug 2014 16:21:54 +0200
parents 4f589fa69b9c
children 90984ae0eaa8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16763
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
1 package com.oracle.truffle.api.dsl.internal;
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
2
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
3 /**
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
4 * This is NOT public API. Do not use directly. This code may change without notice.
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
5 */
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
6 public final class DSLMetadata {
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
7
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
8 public static final Class<?>[] EMPTY_CLASS_ARRAY = new Class<?>[]{};
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
9 public static final DSLMetadata NONE = new DSLMetadata(null, EMPTY_CLASS_ARRAY, EMPTY_CLASS_ARRAY, EMPTY_CLASS_ARRAY, 0, 0);
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
10
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
11 private final Class<?> specializationClass;
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
12 private final Class<?>[] includes;
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
13 private final Class<?>[] excludedBy;
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
14 private final Class<?>[] specializedTypes;
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
15
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
16 private final int costs;
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
17 private final int order;
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
18
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
19 public DSLMetadata(Class<?> specializationClass, Class<?>[] includes, Class<?>[] excludes, Class<?>[] specializedTypes, int costs, int order) {
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
20 this.specializationClass = specializationClass;
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
21 this.includes = includes;
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
22 this.excludedBy = excludes;
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
23 this.specializedTypes = specializedTypes;
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
24 this.costs = costs;
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
25 this.order = order;
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
26 }
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
27
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
28 public Class<?> getSpecializationClass() {
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
29 return specializationClass;
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
30 }
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
31
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
32 public Class<?>[] getSpecializedTypes() {
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
33 return specializedTypes;
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
34 }
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
35
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
36 Class<?>[] getIncludes() {
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
37 return includes;
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
38 }
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
39
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
40 Class<?>[] getExcludedBy() {
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
41 return excludedBy;
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
42 }
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
43
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
44 int getCosts() {
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
45 return costs;
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
46 }
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
47
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
48 int getOrder() {
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
49 return order;
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
50 }
e6d15134ca86 Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents: 16751
diff changeset
51 }