Questions tagged [proxy-classes]

A proxy class is a class functioning as an interface to another class or a service. Proxy classes are implementation of Proxy design pattern. These classes help using large objects or other resources that are expensive or impossible to duplicate.

342 questions
0
votes
2 answers

Why does Doctrine\ORM\Configuration's "DoctrineProxies" Object contain the Universe?

In my ORM code I have an Entity with a field fined like so: //part of entity class Item: /** @Column(name="product_id", type="integer") */ private $productId; I then executed this code: //3 lines ~straight out of Doctrine configuration to get…
Dennis
  • 7,907
  • 11
  • 65
  • 115
0
votes
1 answer

NoClassDefFound in proxy class using InvocationHandler and invoke

We're using JPA (eclipselink 2.5.2 and also tried 2.6.2) and are facing an odd issue: We have some classes, which are accessed via a proxy of itself (as described in this post (the marked solution): Call a method any time other methods are called…
0
votes
1 answer

Get list ReflectionProperty from doctrine proxy object

Example i got a proxy object from Doctrine manager. // $entity is an proxy object from doctrine $relectionClass = new \ReflectionClass($entity); $properties = $class->getProperties(); $properties will return us an empty array, because it reflected…
GusDeCooL
  • 5,639
  • 17
  • 68
  • 102
0
votes
1 answer

After calling NHibernate.Initialize(proxyObject) I'm getting wrong objectType

I have object hierarchy Parent->Child (Lazy loading is set to true by default) Now I'm loading all Parent objects from database. All child object will have the type ChildProxyGUID. then I write the IList parentList =…
Step
  • 3
  • 2
0
votes
4 answers

NHibernate : pattern for returning fully loaded instances from repositories

As part of my endless NHibernate-inspired DAL refactoring purgatory, I have started to use the Repository pattern to keep NHibernate at arms length from my UI layer. Here's an example of a Load method from a repository. public StoredWill Load(int…
0
votes
0 answers

How to write non-const getter functions for classes with proxy reference?

In particular I am trying to create some wrapper functions around boost::dynamic_bitset. There is a similar question, Overloading subscript operator for non-array elements although I'm hoping for a more compact solution without creating additional…
MatrixAndrew
  • 265
  • 3
  • 13
0
votes
2 answers

Bytebuddy - class redefinition in runtime

Can you please tell me if this is possible scenario with byte-buddy: Java program is run. Standard java POJO classes with lots of properties are loaded. ByteBuddy - in runtime modify each class replacing property types e.g. int and Integer with…
Marko Kraljevic
  • 401
  • 4
  • 19
0
votes
0 answers

Generated service reference proxy classes specifically inherit object?

When creating a service reference from a WSDL, all of the proxy classes specifically inherit from object. This makes little to no sense as they would inherit from object anyway, without it being specified. The fact that it is specified makes it…
Josh M.
  • 26,437
  • 24
  • 119
  • 200
0
votes
3 answers

Using a webservice type directly through the DLL

I have a webservice with a function that returns a type (foo). If I consume this webservice in .NET through the 2.0 generated proxies, it creates a class called foo in the generated proxy. If I have the DLL that contains that class (foo) that is…
Kyle W
  • 3,702
  • 20
  • 32
0
votes
2 answers

Making sure an object will implements an interface

I got a class which uses a Proxy. It looks something like this: public class BarWrapper { private final Bar bar; public BarWrapper(Bar bar) { this.bar = bar; } public int someMethodInBar() { return…
CodeMonkey
  • 11,196
  • 30
  • 112
  • 203
0
votes
2 answers

Add methods to generated WCF client proxy code

I'd like to add one additional method for each service operation in my WCF client proxy code (i.e. the generated class that derives from ClientBase). I have written a Visual Studio extension that has an IOperationContractGenerationExtension…
dcstraw
  • 3,243
  • 3
  • 29
  • 38
0
votes
2 answers

Spring MVC - importing spring-security to pom.xml causes @Autowired problems

First of all, it's my post here and I would like to humbly say hi to the SO community - I've found a lot of answers for various issues and got a whole bunch of problems resolved here. But I stumbled upon one issue, that I couldn't find a solution…
0
votes
0 answers

How to implement ProxyInterface hibernate?

Chapter 5, Basic O/R Mapping of hibernate DOCs says: at section 5.1.3. Class You can declare a persistent class using the class element. For example: with the…
user2602807
  • 1,232
  • 2
  • 15
  • 28
0
votes
2 answers

Define the base class or base functionality of a dynamic proxy (e.g. Castle, LinFu)

I've asked this in the NHibernate forumns but I think this is more of a general question. NHibernate uses proxy generators (e.g. Castle) to create its proxy. What I'd like to do is to extend the proxy generated so that it implements some of my own…
GrahamB
  • 1,368
  • 15
  • 35
0
votes
1 answer

Proxying or subclassing base classes?

This is perhaps a too general question, still it bothers me. In general, what's a better practice (and why): proxying or subclassing a base class? By base I mean one of the standard classes, which usually not even implemented in Python. A more…
Bach
  • 6,145
  • 7
  • 36
  • 61