Skip to content

Commit 2658493

Browse files
committed
Update
1 parent 9472eee commit 2658493

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

src/Java.Interop.NamingCustomAttributes/Android.Runtime/RegisterAttribute.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ public RegisterAttribute (string name)
1919
this.name = name;
2020
}
2121

22-
public RegisterAttribute (string name, CustomAttribute originAttribute)
23-
: this (name)
24-
{
25-
OriginAttribute = originAttribute;
26-
}
27-
2822
public RegisterAttribute (string name, string signature, string connector)
2923
: this (name)
3024
{
3125
this.connector = connector;
3226
this.signature = signature;
3327
}
28+
#if HAVE_CECIL
29+
public RegisterAttribute (string name, CustomAttribute originAttribute)
30+
: this (name)
31+
{
32+
OriginAttribute = originAttribute;
33+
}
3434

3535
public RegisterAttribute (string name, string signature, string connector, CustomAttribute originAttribute)
3636
: this (name, signature, connector)
@@ -39,7 +39,7 @@ public RegisterAttribute (string name, string signature, string connector, Custo
3939
}
4040

4141
public CustomAttribute OriginAttribute { get; }
42-
42+
#endif
4343
public string Connector {
4444
get { return connector; }
4545
set { connector = value; }

src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/JavaCallableWrapperGenerator.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ public enum JavaPeerStyle {
2525
JavaInterop1,
2626
}
2727

28-
public interface IJCWMethodClassifier
28+
public abstract class JavaCallableMethodClassifier
2929
{
30-
bool ShouldBeDynamicallyRegistered (MethodDefinition registeredMethod, MethodDefinition implementedMethod, CustomAttribute registerAttribute);
30+
public abstract bool ShouldBeDynamicallyRegistered (MethodDefinition registeredMethod, MethodDefinition implementedMethod, CustomAttribute registerAttribute);
3131
}
3232

3333
public class JavaCallableWrapperGenerator {
@@ -66,19 +66,19 @@ public string GetJavaAccess ()
6666
List<JavaCallableWrapperGenerator> children;
6767

6868
readonly IMetadataResolver cache;
69-
readonly IJCWMethodClassifier methodClassifier;
69+
readonly JavaCallableMethodClassifier methodClassifier;
7070

7171
[Obsolete ("Use the TypeDefinitionCache overload for better performance.")]
7272
public JavaCallableWrapperGenerator (TypeDefinition type, Action<string, object []> log)
7373
: this (type, null, log, resolver: null)
7474
{ }
7575

76-
public JavaCallableWrapperGenerator (TypeDefinition type, Action<string, object[]> log, TypeDefinitionCache cache, IJCWMethodClassifier methodClassifier = null)
76+
public JavaCallableWrapperGenerator (TypeDefinition type, Action<string, object[]> log, TypeDefinitionCache cache, JavaCallableMethodClassifier methodClassifier = null)
7777
: this (type, log, (IMetadataResolver) cache, methodClassifier)
7878
{
7979
}
8080

81-
public JavaCallableWrapperGenerator (TypeDefinition type, Action<string, object[]> log, IMetadataResolver resolver, IJCWMethodClassifier methodClassifier = null)
81+
public JavaCallableWrapperGenerator (TypeDefinition type, Action<string, object[]> log, IMetadataResolver resolver, JavaCallableMethodClassifier methodClassifier = null)
8282
: this (type, null, log, resolver, methodClassifier)
8383
{
8484
if (type.HasNestedTypes) {
@@ -124,7 +124,7 @@ void AddNestedTypes (TypeDefinition type)
124124
HasExport |= children.Any (t => t.HasExport);
125125
}
126126

127-
JavaCallableWrapperGenerator (TypeDefinition type, string outerType, Action<string, object[]> log, IMetadataResolver resolver, IJCWMethodClassifier methodClassifier = null)
127+
JavaCallableWrapperGenerator (TypeDefinition type, string outerType, Action<string, object[]> log, IMetadataResolver resolver, JavaCallableMethodClassifier methodClassifier = null)
128128
{
129129
this.methodClassifier = methodClassifier;
130130
this.type = type;

0 commit comments

Comments
 (0)