{
proxyConstructor = proxyClass.getConstructor( InvocationHandler.class );
}
catch( NoSuchMethodException e )
{
throw (InvalidCompositeException) new InvalidCompositeException( "Could not get proxy constructor" ).initCause( e );
}
proxyConstructor.setAccessible( true );
}
else
{
try
{
proxyClass = new TransientClassLoader( getClass().getClassLoader() ).loadFragmentClass( mainType );
proxyConstructor = (Constructor<? extends Composite>) proxyClass.getConstructors()[ 0 ];
}
catch( ClassNotFoundException e )
{
throw (InvalidCompositeException) new InvalidCompositeException( "Could not get proxy constructor" ).initCause( e );
}
}
}