Reflection is the process by which a program can observe and modify its own structure and behavior at runtime.

learn more… | top users | synonyms

2
votes
2answers
53 views

Extension methods for class Type

While working on one of my projects I actively used Reflection. While working with class Type I expected methods: TryGetMember, TryGetProperty, TryGetField, TryGetMethod. I've implemented them as ...
0
votes
0answers
41 views

Java reflection and static classes

I try to intercept some OpenGL calls for testing my rendering classes. Reflection is used for replacing the OpenGL backend. I feel this class is badly written and I need advices for refactoring it. ...
3
votes
1answer
70 views

How to avoid echoing JavaScript from PHP?

I want to use some constant in both server side and client side. Currently, I use PHP reflection in order to synchronize PHP constants and Javascript constants. But for the maintainable reason, it's ...
2
votes
1answer
64 views

PHP ORM like system

I'm using PDO, but I want to create my own class for more convenient work with the database. My main idea in example with comments: <?php /** * User entity. I want to save it into database. * ...
0
votes
3answers
109 views

New to LINQ, not sure this is best practice

So i have a super class that has a 3 child classes. Those 3 child classes have multiple classes of their own. I was having troubles saving this into XML, so I decided to parse it out and do a little ...
2
votes
1answer
31 views

Multiple target method invocation wrapper

I'm currently working on a system using WCF to communicate between a Windows Service and one or multiple clients. Service is required to answer clients calls, as well as notify them of certain events, ...
2
votes
1answer
50 views

ORM Entity with many similar relationships

To provide some background context, I'm implementing a web-based solution (Java, Spring, Hibernate) that allows the creation/authoring of task-centric workflow documents. Basically a workflow ...
0
votes
0answers
37 views

Suggest improvements to Perl remote server for serving Perl code via reflection

I built a custom XML-RPC server in Perl that "supposedly" serves any given Perl code module/class whose structure conforms to some compatible specifications, and the server serves it dynamically at ...
8
votes
2answers
312 views

Evaluate the best common type to fit both of types

Here is an algorithm to evaluate best matching System.Type for two types in hierarhy. This is one of answers for this StackOverflow question by Ken Kin: Evaluate the maximum possible type to fit ...
1
vote
1answer
343 views

Inject dependency into PostSharp aspect

I have designed couple of aspects using PostSharp for different projects, but there is a design flaw in many of them: dependency management. This is a question about injection of dependencies into ...
1
vote
1answer
40 views

Action based controller using reflections

I'm modeling a controller reflection based. I would like to know if you agree my implementation and what could to be enhanced. I'm starting with reflection and I would like to know if I'm using good ...
1
vote
1answer
128 views

PHP class and interface interrogation using reflection

I have been working on a class to use Reflection to interrogate other PHP classes and interfaces, what I want to know from anyone with more experience of this is, is there anything else I can add, or ...
1
vote
1answer
180 views

PHP Lazy loading with __get - yay or nay?

I have my own PHP MVC framework that I'm iteratively developing (i.e. adding a feature when I have the time). I'm trying to keep it to the best practices I can, while still adding the most in terms of ...
2
votes
1answer
773 views

Usage of Expression<Func<T>>

I am developing data-interfacing that converts between two different data models. However, I must be sure that all required fields exist. Therefore I have written this utility class that I can easily ...
3
votes
3answers
462 views

Ruby fibonacci(n) recursive computation optimized with reflection. Is this good Ruby?

I'm coming from Java and this is my first attempt with Ruby reflection. The idea is to take the common-known (and awfully bad performing) fibonacci(n) recursive method: # recursively computate ...

1 2
15 30 50 per page