Skip to content

Commit

Permalink
v1.4.32
Browse files Browse the repository at this point in the history
- reflection_factory: ^2.2.2
  • Loading branch information
gmpassos committed Oct 17, 2023
1 parent 17e12ee commit 592ec0e
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.2.3

- Added `ClassProxy.ignoreMethods2`.

## 2.2.2

- Added `@IgnoreClassProxyMethod`.
Expand Down
4 changes: 2 additions & 2 deletions example/reflection_factory_bridge_example.reflection.g.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// GENERATED CODE - DO NOT MODIFY BY HAND!
// BUILDER: reflection_factory/2.2.2
// BUILDER: reflection_factory/2.2.3
// BUILD COMMAND: dart run build_runner build
//

Expand All @@ -20,7 +20,7 @@ typedef __TI<T> = TypeInfo<T>;
typedef __PR = ParameterReflection;

mixin __ReflectionMixin {
static final Version _version = Version.parse('2.2.2');
static final Version _version = Version.parse('2.2.3');

Version get reflectionFactoryVersion => _version;

Expand Down
4 changes: 2 additions & 2 deletions example/reflection_factory_example.reflection.g.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// GENERATED CODE - DO NOT MODIFY BY HAND!
// BUILDER: reflection_factory/2.2.2
// BUILDER: reflection_factory/2.2.3
// BUILD COMMAND: dart run build_runner build
//

Expand All @@ -20,7 +20,7 @@ typedef __TI<T> = TypeInfo<T>;
typedef __PR = ParameterReflection;

mixin __ReflectionMixin {
static final Version _version = Version.parse('2.2.2');
static final Version _version = Version.parse('2.2.3');

Version get reflectionFactoryVersion => _version;

Expand Down
19 changes: 19 additions & 0 deletions lib/src/reflection_factory_annotation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,40 @@ class ReflectionBridge {
/// - [reflectionProxyName] is the name of the generated proxy.
@Target({TargetKind.classType})
class ClassProxy {
/// The class name for the proxy.
final String className;

/// The Dart library name with the [className].
final String libraryName;

/// The library path for [libraryName].
final String libraryPath;

/// The name of the generated reflection proxy.
final String reflectionProxyName;

/// If `true` all methods will return a Future<R>.
final bool alwaysReturnFuture;

/// The list return o types to traverse.
final Set<Type> traverseReturnTypes;

/// The parameters types to ignore
final Set<Type> ignoreParametersTypes;

/// Methods to ignore.
final Set<String> ignoreMethods;

/// Extra methods to ignore.
final Set<String> ignoreMethods2;

const ClassProxy(
this.className, {
this.libraryName = '',
this.libraryPath = '',
this.reflectionProxyName = '',
this.ignoreMethods = const <String>{},
this.ignoreMethods2 = const <String>{},
this.alwaysReturnFuture = false,
this.traverseReturnTypes = const <Type>{},
this.ignoreParametersTypes = const <Type>{},
Expand Down
2 changes: 1 addition & 1 deletion lib/src/reflection_factory_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import 'reflection_factory_utils.dart';
/// Class with all registered reflections ([ClassReflection]).
class ReflectionFactory {
// ignore: constant_identifier_names
static const String VERSION = '2.2.2';
static const String VERSION = '2.2.3';

static final ReflectionFactory _instance = ReflectionFactory._();

Expand Down
5 changes: 4 additions & 1 deletion lib/src/reflection_factory_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,10 @@ class ReflectionBuilder implements Builder {
var traverseReturnTypes = annotation.peek('traverseReturnTypes')!.setValue;
var ignoreParametersTypes =
annotation.peek('ignoreParametersTypes')!.setValue;
var ignoreMethods = annotation.peek('ignoreMethods')!.setValue;

var ignoreMethods1 = annotation.peek('ignoreMethods')!.setValue;
var ignoreMethods2 = annotation.peek('ignoreMethods2')!.setValue;
var ignoreMethods = {...ignoreMethods1, ...ignoreMethods2};

if (reflectionProxyName.isEmpty) {
reflectionProxyName = annotatedClass.name;
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: reflection_factory
description: Allows Dart reflection with an easy approach, even for third-party classes, using code generation portable for all Dart platforms.
version: 2.2.2
version: 2.2.3
homepage: https://github.com/gmpassos/reflection_factory

environment:
Expand Down
4 changes: 2 additions & 2 deletions test/src/reflection/user_with_reflection.g.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// GENERATED CODE - DO NOT MODIFY BY HAND!
// BUILDER: reflection_factory/2.2.2
// BUILDER: reflection_factory/2.2.3
// BUILD COMMAND: dart run build_runner build
//

Expand All @@ -20,7 +20,7 @@ typedef __TI<T> = TypeInfo<T>;
typedef __PR = ParameterReflection;

mixin __ReflectionMixin {
static final Version _version = Version.parse('2.2.2');
static final Version _version = Version.parse('2.2.3');

Version get reflectionFactoryVersion => _version;

Expand Down
4 changes: 2 additions & 2 deletions test/src/user_reflection_bridge.reflection.g.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// GENERATED CODE - DO NOT MODIFY BY HAND!
// BUILDER: reflection_factory/2.2.2
// BUILDER: reflection_factory/2.2.3
// BUILD COMMAND: dart run build_runner build
//

Expand All @@ -20,7 +20,7 @@ typedef __TI<T> = TypeInfo<T>;
typedef __PR = ParameterReflection;

mixin __ReflectionMixin {
static final Version _version = Version.parse('2.2.2');
static final Version _version = Version.parse('2.2.3');

Version get reflectionFactoryVersion => _version;

Expand Down

0 comments on commit 592ec0e

Please sign in to comment.