text:
<meta http-equiv="Content-Language" content="en-us">
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
<title>EJB Tasks</title>

Apache Ant EJB Tasks User Manual

by

Paul Austin (p_d_austin@yahoo.com)

Holger Engels (hengels@innovidata.com)

Tim Fennell (tfenne@rcn.com)

Martin Gee (martin.gee@icsynergy.com)

Conor MacNeill

Cyrille Morvan (cmorvan@ingenosya.com)

Greg Nelson (gn@sun.com)

Rob van Oostrum(rob@springwellfarms.ca)

Table of Contents

Introduction

EJB Tasks

Introduction

Ant provides a number of optional tasks for developing 1.x and 2.x
Enterprise Java Beans (EJBs).
In general these tasks are specific to the particular vendor's EJB Server.

 The tasks support:

Borland
  Application Server 4.5

iPlanet
  Application Server 6.0

  JBoss 2.1 and above EJB servers

Weblogic
   4.5.1 through to 7.0 EJB servers

JOnAS
   2.4.x and 2.5 Open Source EJB server

IBM WebSphere 4.0

    Vendors such as BEA and IBM now provide custom Ant tasks to work with their
    particular products. More importantly, EJB3.0 renders this whole process obsolete.
    Accordingly, development of these tasks is effectively frozen. Bug reports
    and especially patches are welcome, but there is no pressing need to add
    support for new application servers. Nobody should be writing new EJB2.x applications
    and definitely not new EJB2.x servers.

EJB Tasks

Task	Application Servers

blgenclient	Borland Application Server 4.5 and 5.x

iplanet-ejbc	iPlanet Application Server 6.0

ejbjar	Nested Elements

borland	Borland Application Server 4.5 and 5.x

iPlanet	iPlanet Application Server 6.0

jboss	JBoss

jonas	JOnAS 2.4.x and 2.5

weblogic	Weblogic 5.1 to 7.0

websphere	IBM WebSphere 4.0

ddcreator

Description:

ddcreator will compile a set of Weblogic text-based deployment descriptors into a serialized
EJB deployment descriptor. The selection of which of the text-based descriptors are to be compiled
is based on the standard Ant include and exclude selection mechanisms.

Parameters:

    Attribute
    Description
    Required

    descriptors
    This is the base directory from which descriptors are selected.
    Yes

    dest
    The directory where the serialized deployment descriptors will be written
    Yes

    classpath
    This is the classpath to use to run the underlying weblogic ddcreator tool.
                     This must include the weblogic.ejb.utils.DDCreator class
    No

Examples

<ddcreator descriptors="${dd.dir}"
           dest="${gen.classes}"
           classpath="${descriptorbuild.classpath}">
  <include name="*.txt"/>
</ddcreator>

ejbc

Description:

The ejbc task will run Weblogic's ejbc tool. This tool will take a serialized deployment descriptor,
examine the various EJB interfaces and bean classes and then generate the required support classes
necessary to deploy the bean in a Weblogic EJB container. This will include the RMI stubs and skeletons
as well as the classes which implement the bean's home and remote interfaces.

The ant task which runs this tool is able to compile several beans in a single operation. The beans to be
compiled are selected by including their serialized deployment descriptors. The standard ant
include and exclude constructs can be used to select the deployment descriptors
to be included.

Each descriptor is examined to determine whether the generated classes are out of date and need to be
regenerated. The deployment descriptor is de-serialized to discover the home, remote and
implementation classes. The corresponding source files are determined and checked to see their
modification times. These times and the modification time of the serialized descriptor itself are
compared with the modification time of the generated classes. If the generated classes are not present
or are out of date, the ejbc tool is run to generate new versions.

Parameters:

    Attribute
    Description
    Required

    descriptors
    This is the base directory from which the serialized deployment descriptors are selected.
    Yes

    dest
    The base directory where the generated classes, RIM stubs and RMI skeletons are written
    Yes

    manifest
    The name of a manifest file to be written. This manifest will contain an entry for each EJB processed
    Yes

    src
    The base directory of the source tree containing the source files of the home interface,
                     remote interface and bean implementation classes.
    Yes

    classpath
    This classpath must include both the weblogic.ejbc class and the
                     class files of the bean, home interface, remote interface, etc of the bean being
                     processed.
    No

    keepgenerated
    Controls whether ejbc will keep the
        intermediate Java files used to build the class files. This can be
        useful when debugging.
    No, defaults to false.

Examples

<ejbc descriptors="${gen.classes}"
           src="${src.dir}"
           dest="${gen.classes}"
           manifest="${build.manifest}"
           classpath="${descriptorbuild.classpath}">
  <include name="*.ser"/>
</ejbc>

iplanet-ejbc

Description:

Task to compile EJB stubs and skeletons for the iPlanet Application Server
6.0.  Given a standard EJB 1.1 XML descriptor as well as an iAS-specific
EJB descriptor, this task will generate the stubs and skeletons required
to deploy the EJB to iAS.  Since the XML descriptors can include multiple
EJBs, this is a convenient way of specifying many EJBs in a single Ant
task.

For each EJB specified, the task will locate the three classes that
comprise the EJB in the destination directory.  If these class files
cannot be located in the destination directory, the task will fail. The
task will also attempt to locate the EJB stubs and skeletons in this directory.
If found, the timestamps on the stubs and skeletons will be checked to
ensure they are up to date. Only if these files cannot be found or if they
are out of date will the iAS ejbc utility be called to generate new stubs
and skeletons.

Parameters:

Attribute

Description

Required

ejbdescriptor

Standard EJB 1.1 XML descriptor (typically titled "ejb-jar.xml").

Yes

iasdescriptor

iAS-specific EJB XML descriptor (typically titled "ias-ejb-jar.xml").

Yes

dest

The is the base directory where the RMI stubs and skeletons
are written. In addition, the class files for each bean (home interface,
remote interface, and EJB implementation) must be found in this directory.

Yes

classpath

The classpath used when generating EJB stubs and skeletons.
If omitted, the classpath specified when Ant was started will be used.
Nested "classpath" elements may also be used.

No

keepgenerated

Indicates whether or not the Java source files which are
generated by ejbc will be saved or automatically deleted. If "yes", the
source files will be retained. If omitted, it defaults to "no".

No

debug

Indicates whether or not the ejbc utility should log additional debugging
statements to the standard output. If "yes", the additional debugging statements
will be generated.  If omitted, it defaults to "no".

No

iashome

May be used to specify the "home" directory for this iAS installation.
This is used to find the ejbc utility if it isn't included in the user's
system path. If specified, it should refer to the "[install-location]/iplanet/ias6/ias"
directory. If omitted, the ejbc utility must be on the user's system path.

No

Examples

<iplanet-ejbc ejbdescriptor="ejb-jar.xml"
              iasdescriptor="ias-ejb-jar.xml"
              dest="${build.classesdir}"
              classpath="${ias.ejbc.cpath}"/>

<iplanet-ejbc ejbdescriptor="ejb-jar.xml"
              iasdescriptor="ias-ejb-jar.xml"
              dest="${build.classesdir}"
              keepgenerated="yes"
              debug="yes"
              iashome="${ias.home}">
              <classpath>
                  <pathelement path="."/>
                  <pathelement path="${build.classpath}"/>
              </classpath>
</iplanet-ejbc>

wlrun

Description:

The wlrun task is used to start a weblogic server. The task runs
a weblogic instance in a separate Java Virtual Machine. A number of parameters
are used to control the operation of the weblogic instance. Note that the task,
and hence ant, will not complete until the weblogic instance is stopped.

Parameters:

    Attribute
    Description
    Required for 4.5.1 and 5.1
    Required for 6.0

    BEA Home
    The location of the BEA Home where the server's config is defined.
                     If this attribute is present, wlrun assumes that the server will
                     be running under Weblogic 6.0
    N/A
    Yes

    home
    The location of the weblogic home that is to be used. This is the location
                     where weblogic is installed.
    Yes
    Yes. Note this is the absolute location, not relative to
                                    BEA home.

    Domain
    The domain to which the server belongs.
    N/A
    Yes

    classpath
    The classpath to be used with the Java Virtual Machine that runs the Weblogic
                     Server. Prior to Weblogic 6.0, this is typically set to the Weblogic
                     boot classpath. Under Weblogic 6.0 this should include all the
                     weblogic jars
    Yes
    Yes

    wlclasspath
    The weblogic classpath used by the Weblogic Server.
    No
    N/A

    properties
    The name of the server's properties file within the weblogic home directory
                     used to control the weblogic instance.
    Yes
    N/A

    name
    The name of the weblogic server within the weblogic home which is to be run.
                     This defaults to "myserver"
    No
    No

    policy
    The name of the security policy file within the weblogic home directory that
                     is to be used. If not specified, the default policy file weblogic.policy
                     is used.
    No
    No

    username
    The management username used to manage the server
    N/A
    No

    password
    The server's management password
    N/A
    Yes

    pkPassword
    The private key password so the server can decrypt the SSL
                     private key file
    N/A
    No

    jvmargs
    Additional argument string passed to the Java Virtual Machine used to run the
                     Weblogic instance.
    No
    No

    weblogicMainClass
    name of the main class for weblogic
    No
    No

Nested Elements

The wlrun task supports nested <classpath> and <wlclasspath>
elements to set the respective classpaths.

Examples

This example shows the use of wlrun to run a server under Weblogic 5.1

    <wlrun taskname="myserver"
           classpath="${weblogic.boot.classpath}"
           wlclasspath="${weblogic.classes}:${code.jars}"
           name="myserver"
           home="${weblogic.home}"
           properties="myserver/myserver.properties"/>

This example shows wlrun being used to run the petstore server under
Weblogic 6.0

    <wlrun taskname="petstore"
           classpath="${weblogic.classes}"
           name="petstoreServer"
           domain="petstore"
           home="${weblogic.home}"
           password="petstorePassword"
           beahome="${bea.home}"/>

wlstop

Description:

The wlstop task is used to stop a weblogic instance which is
currently running. To shut down an instance you must supply both a username and
a password. These will be stored in the clear in the build script used to stop
the instance. For security reasons, this task is therefore only appropriate in a
development environment.

This task works for most version of Weblogic, including 6.0. You need to
specify the BEA Home to have this task work correctly under 6.0

Parameters:

    Attribute
    Description
    Required

    BEAHome
    This attribute selects Weblogic 6.0 shutdown.
    No

    classpath
    The classpath to be used with the Java Virtual Machine that runs the Weblogic
                     Shutdown command.
    Yes

    user
    The username of the account which will be used to shutdown the server
    Yes

    password
    The password for the account specified in the user parameter.
    Yes

    url
    The URL which describes the port to which the server is listening for T3 connections.
                     For example, t3://localhost:7001
    Yes

    delay
    The delay in seconds after which the server will stop. This defaults to an
                     immediate shutdown.
    No

Nested Element

The classpath of the wlstop task can be set by a <classpath> nested element.

Examples

This example show the shutdown for a Weblogic 6.0 server

    <wlstop classpath="${weblogic.classes}"
            user="system"
            url="t3://localhost:7001"
            password="foobar"
            beahome="${bea.home}"/>

ejbjar

Description:

This task is designed to support building of EJB jar files (EJB 1.1 & 2.0).
Support is currently provided for 'vanilla' EJB jar files - i.e. those containing only
the user generated class files and the standard deployment descriptor. Nested
elements provide support for vendor specific deployment tools. These currently
include:

Borland Application Server 4.5

iPlanet Application Server 6.0

JBoss 2.1 and above

Weblogic 5.1/6.0 session/entity beans using the weblogic.ejbc tool

IBM WebSphere 4.0

TOPLink for WebLogic 2.5.1-enabled entity beans

JOnAS 2.4.x and 2.5 Open Source EJB server

The task works as a directory scanning task, and performs an action for each
deployment descriptor found. As such the includes and excludes should be set
to ensure that all desired EJB descriptors are found, but no application
server descriptors are found. For each descriptor found, ejbjar will parse the
deployment descriptor to determine the necessary class files which implement the
bean. These files are assembled along with the deployment descriptors into a
well formed EJB jar file. Any support files which need to be included in the
generated jar can be added with the <support> nested element. For each
class included in the jar, ejbjar will scan for any super classes or super
interfaces. These will be added to the generated jar.

If no nested vendor-specific deployment elements are present, the task will
simply generate a generic EJB jar. Such jars are typically used as the input to
vendor-specific deployment tools. For each nested deployment element, a vendor
specific deployment tool is run to generate a jar file ready for deployment in
that vendor's EJB container.

The jar files are only built if they are out of date.  Each deployment tool
element will examine its target jar file and determine if it is out of date with
respect to the class files and deployment descriptors that make up the bean. If
any of these files are newer than the jar file the jar will be rebuilt otherwise
a message is logged that the jar file is up to date.

The task uses the
 BCEL  framework
to extract all dependent classes. This
means that, in addition to the classes that are mentioned in the
deployment descriptor, any classes that these depend on are also
automatically included in the jar file.

Naming Convention

Ejbjar handles the processing of multiple beans, and it uses a set of naming
conventions to determine the name of the generated EJB jars. The naming convention
that is used is controlled by the "naming" attribute. It supports the
following values

descriptor

This is the default naming scheme. The name of the generated bean is derived from the
name of the deployment descriptor.  For an Account bean, for example, the deployment
descriptor would be named Account-ejb-jar.xml. Vendor specific descriptors are
located using the same naming convention. The weblogic bean, for example, would be named
Account-weblogic-ejb-jar.xml. Under this arrangement, the deployment descriptors
can be separated from the code implementing the beans, which can be useful when the same bean code
is deployed in separate beans.

This scheme is useful when you are using one bean per EJB jar and where you may be
deploying the same bean classes in different beans, with different deployment characteristics.

ejb-name

 This naming scheme uses the <ejb-name> element from the deployment descriptor to
determine the bean name. In this situation, the descriptors normally use the generic
descriptor names, such as ejb-jar.xml along with any associated vendor specific descriptor
names. For example, If the value of the <ejb-name> were to be given in the deployment descriptor
as follows:

<ejb-jar>
    <enterprise-beans>
        <entity>
            <ejb-name>Sample</ejb-name>
            <home>org.apache.ant.ejbsample.SampleHome</home>

then the name of the generated bean would be Sample.jar

 This scheme is useful where you want to use the standard deployment descriptor names, which may be more
compatible with other EJB tools. This scheme must have one bean per jar.

directory

In this mode, the name of the generated bean jar is derived from the directory
containing the deployment descriptors. Again the deployment descriptors typically use
the standard filenames. For example, if the path to the deployment descriptor is
/home/user/dev/appserver/dd/sample, then the generated
bean will be named sample.jar

This scheme is also useful when you want to use standard style descriptor names. It is often
most useful when the  descriptors are located in the same directory as the bean source code,
although that is not mandatory. This scheme can handle multiple beans per jar.

basejarname

The final scheme supported by the <ejbjar> task is used when you want to specify the generated
bean jar name directly. In this case the name of the generated jar is specified by the
"basejarname" attribute. Since all generated beans will have the same name, this task should
be only used when each descriptor is in its own directory.

This scheme is most appropriate when you are using multiple beans per jar and only process a single
deployment descriptor. You typically want to specify the name of the jar and not derive it from the
beans in the jar.

Dependencies

In addition to the bean classes, ejbjar is able to ad additional classes to the generated
ejbjar. These classes are typically the support classes which are used by the bean's classes or as
parameters to the bean's methods.

In versions of Ant prior to 1.5, ejbjar used reflection and attempted to add the super
classes and super interfaces of the bean classes. For this technique to work the bean
classes had to be loaded into Ant's JVM. This was not always possible due to class dependencies.

The ejbjar task in Ant releases 1.5 and later uses the
 BCEL  library
to analyze the bean's class
files directly, rather than loading them into the JVM. This also allows ejbjar to add all
of the required support classes for a bean and not just super classes.

In Ant 1.5, a new attribute, dependency has been introduced to allow the
buildfile to control what additional classes are added to the generated jar. It takes three
possible values

none - only the bean classes and interfaces described in the bean's
descriptor are added to the jar.

super - this is the default value and replicates the original ejbjar
behaviour where super classes and super interfaces are added to the jar

full - In this mode all classes used by the bean's classes and interfaces
are added to the jar

The super and full values require the
 BCEL  library
to be available. If it is not, ejbjar will drop back to the behaviour corresponding to
the value none.

Parameters:

    Attribute
    Description
    Required

    descriptordir
    The base directory under which to scan for EJB
                     deployment descriptors. If this attribute is not
                     specified, then the deployment descriptors must be
                     located in the directory specified by the 'srcdir'
                     attribute.
    No

    srcdir
    The base directory containing the .class files that
                     make up the bean. Included are the home- remote- pk-
                     and implementation- classes and all classes, that these
                     depend on. Note that this can be the same as the
                     descriptordir if all files are in the same directory
                     tree.
    Yes

    destdir
    The base directory into which generated jar files are
                     deposited. Jar files are deposited in directories
                     corresponding to their location within the descriptordir
                     namespace. Note that this attribute is only used if the
                     task is generating generic jars (i.e. no vendor-specific
                     deployment elements have been specified).
    Yes, unless vendor-specific deployment elements
    have been specified.

    cmpversion
    Either 1.0 or 2.0.

    Default is 1.0.

    A CMP 2.0 implementation exists currently only for JBoss.
    No

    naming
    Controls the naming convention used to name generated
                     EJB jars. Please refer to the description above.
    No

    basejarname
    The base name that is used for the generated jar files.
                     If this attribute is specified, the generic jar file name
                     will use this value as the prefix (followed by the value
                     specified in the 'genericjarsuffix' attribute) and the
                     resultant ejb jar file (followed by any suffix specified
                     in the nested element).
    No

    basenameterminator
    String value used to substring out a string from the name
                     of each deployment descriptor found, which is then used to
                     locate related deployment descriptors (e.g. the WebLogic
                     descriptors). For example, a basename of '.' and a
                     deployment descriptor called 'FooBean.ejb-jar.xml' would
                     result in a basename of 'FooBean' which would then be used
                     to find FooBean.weblogic-ejb-jar.xml and
                     FooBean.weblogic-cmp-rdbms-jar.xml, as well as to create
                     the filenames of the jar files as FooBean-generic.jar and
                     FooBean-wl.jar. This attribute is not used if the
                     'basejarname' attribute is specified.
    No, defaults to '-'.

    genericjarsuffix
    String value appended to the basename of the deployment
                     descriptor to create the filename of the generic EJB jar
                     file.
    No, defaults to '-generic.jar'.

    classpath
    This classpath is used when resolving classes which
                     are to be added to the jar. Typically nested deployment
                     tool elements will also support a classpath which
                     will be combined with this classpath when resolving
                     classes
    No.

    flatdestdir
    Set this attribute to true if you want all generated jars
                     to be placed in the root of the destdir, rather than
                     according to the location of the deployment descriptor
                     within the descriptor dir hierarchy.
    No.

    dependency
    This attribute controls which additional classes and interfaces
                     are added to the jar. Please refer to the description
                     above
    No.

    manifest
    the manifest file to use, if any.
    No

Nested Elements

In addition to the vendor specific nested elements, the ejbjar task provides
three nested elements.

Classpath

The <classpath> nested element allows the classpath
to be set. It is useful when setting the classpath from a reference path. In all
other respects the behaviour is the same as the classpath attribute.

dtd

The <dtd> element is used to specify the local location of DTDs to be
used when parsing the EJB deployment descriptor. Using a local DTD is much
faster than loading the DTD across the net. If you are running ejbjar behind a
firewall you may not even be able to access the remote DTD. The supported
vendor-specific nested elements know the location of the required DTDs within
the vendor class hierarchy and, in general, this means <dtd> elements are
not required. It does mean, however, that the vendor's class hierarchy must be
available in the classpath when Ant is started. If your want to run Ant without
requiring the vendor classes in the classpath, you would need to use a
<dtd> element.

    Attribute
    Description
    Required

    publicId
    The public Id of the DTD for which the location is being provided
    Yes

    location
    The location of the local copy of the DTD. This can either be a
                     file or a resource loadable from the classpath.
    Yes

support

The <support> nested element is used to supply additional classes
(files) to be included in the generated jars. The <support> element is a
FileSet, so it can either reference a fileset declared elsewhere or it can be
defined in-place with the appropriate <include> and <exclude> nested
elements. The files in the support fileset are added into the generated EJB jar
in the same relative location as their location within the support fileset. Note
that when ejbjar generates more than one jar file, the support files are added
to each one.

Vendor-specific deployment elements

Each vendor-specific nested element controls the generation of a deployable jar
specific to that vendor's EJB container. The parameters for each supported
deployment element are detailed here.

Jboss element

The jboss element searches for the JBoss specific deployment descriptors and adds them
to the final ejb jar file. JBoss has two deployment descriptors:

jboss.xml

for container manager persistence:

CMP version	File name

CMP 1.0	jaws.xml

CMP 2.0	jbosscmp-jdbc.xml

. The JBoss server uses hot deployment and does
not require compilation of additional stubs and skeletons.

    Attribute
    Description
    Required

    destdir
    The base directory into which the generated weblogic ready
                     jar files are deposited. Jar files are deposited in
                     directories corresponding to their location within the
                     descriptordir namespace.
    Yes

    genericjarsuffix
    A generic jar is generated as an intermediate step in
                     build the weblogic deployment jar. The suffix used to
                     generate the generic jar file is not particularly
                     important unless it is desired to keep the generic
                     jar file. It should not, however, be the same
                     as the suffix setting.
    No, defaults to '-generic.jar'.

    suffix
    String value appended to the basename of the deployment
                     descriptor to create the filename of the JBoss EJB
                     jar file.
    No, defaults to '.jar'.

    keepgeneric
    This controls whether the generic file used as input to
                     ejbc is retained.
    No, defaults to false

Weblogic element

The weblogic element is used to control the weblogic.ejbc compiler for
generating weblogic EJB jars. Prior to Ant 1.3, the method of locating CMP
descriptors was to use the ejbjar naming convention. So if your ejb-jar was
called, Customer-ejb-jar.xml, your weblogic descriptor was called Customer-
weblogic-ejb-jar.xml and your CMP descriptor had to be Customer-weblogic-cmp-
rdbms-jar.xml. In addition, the <type-storage> element in the weblogic
descriptor had to be set to the standard name META-INF/weblogic-cmp-rdbms-
jar.xml, as that is where the CMP descriptor was mapped to in the generated
jar.

There are a few problems with this scheme. It does not allow for more than
one CMP descriptor to be defined in a jar and it is not compatible with the
deployment descriptors generated by some tools.

In Ant 1.3, ejbjar parses the weblogic deployment descriptor to discover the
CMP descriptors, which are then included automatically. This behaviour is
controlled by the newCMP attribute. Note that if you move to the new method of
determining CMP descriptors, you will need to update your weblogic deployment
descriptor's <type-storage> element. In the above example, you would
define this as META-INF/Customer-weblogic-cmp-rdbms-jar.xml.

    Attribute
    Description
    Required

    destdir
    The base directory into which the generated weblogic ready
                     jar files are deposited. Jar files are deposited in
                     directories corresponding to their location within the
                     descriptordir namespace.
    Yes

    genericjarsuffix
    A generic jar is generated as an intermediate step in
                     build the weblogic deployment jar. The suffix used to
                     generate the generic jar file is not particularly
                     important unless it is desired to keep the generic
                     jar file. It should not, however, be the same
                     as the suffix setting.
    No, defaults to '-generic.jar'.

    suffix
    String value appended to the basename of the deployment
                     descriptor to create the filename of the WebLogic EJB
                     jar file.
    No, defaults to '.jar'.

    classpath
    The classpath to be used when running the weblogic ejbc
                     tool. Note that this tool typically requires the classes
                     that make up the bean to be available on the classpath.
                     Currently, however, this will cause the ejbc tool to be
                     run in a separate VM
    No

    wlclasspath
    Weblogic 6.0 will give a warning if the home and remote interfaces
                     of a bean are on the system classpath used to run weblogic.ejbc.
                     In that case, the standard weblogic classes should be set with
                     this attribute (or equivalent nested element) and the
                     home and remote interfaces located with the standard classpath
                     attribute
    No

    keepgeneric
    This controls whether the generic file used as input to
                     ejbc is retained.
    No, defaults to false

    compiler
    This allows for the selection of a different compiler
                     to be used for the compilation of the generated Java
                     files. This could be set, for example, to Jikes to
                     compile with the Jikes compiler. If this is not set
                     and the build.compiler property is set
                     to jikes, the Jikes compiler will be used. If this
                     is not desired, the value "default"
                     may be given to use the default compiler
    No

    rebuild
    This flag controls whether weblogic.ejbc is always
                     invoked to build the jar file. In certain circumstances,
                     such as when only a bean class has been changed, the jar
                     can be generated by merely replacing the changed classes
                     and not rerunning ejbc. Setting this to false will reduce
                     the time to run ejbjar.

    No, defaults to true.

    keepgenerated
    Controls whether weblogic will keep the generated Java
                     files used to build the class files added to the
                     jar. This can be useful when debugging

    No, defaults to false.

    args
    Any additional arguments to be passed to the weblogic.ejbc
                     tool.

    No.

    weblogicdtd
    Deprecated. Defines the location of the ejb-jar DTD in
                     the weblogic class hierarchy. This should not be necessary if you
                     have weblogic in your classpath. If you do not, you should use a
                     nested <dtd> element, described above. If you do choose
                     to use an attribute, you should use a
                     nested <dtd> element.

    No.

    wldtd
    Deprecated. Defines the location of the weblogic-ejb-jar
                     DTD which covers the Weblogic specific deployment descriptors.
                     This should not be necessary if you have weblogic in your
                     classpath. If you do not, you should use a nested <dtd>
                     element, described above.

    No.

    ejbdtd
    Deprecated. Defines the location of the ejb-jar DTD in
                     the weblogic class hierarchy. This should not be necessary if you
                     have weblogic in your classpath. If you do not, you should use a
                     nested <dtd> element, described above.

    No.

    newCMP
    If this is set to true, the new method for locating
                     CMP descriptors will be used.
    No. Defaults to false

    oldCMP
    Deprecated This is an antonym for newCMP which should be used instead.
    No.

    noEJBC
    If this attribute is set to true, Weblogic's ejbc will not be run on the EJB jar.
                     Use this if you prefer to run ejbc at deployment time.
    No.

    ejbcclass
    Specifies the classname of the ejbc compiler. Normally ejbjar determines
                     the appropriate class based on the DTD used for the EJB. The EJB 2.0 compiler
                     featured in weblogic 6 has, however, been deprecated in version 7. When
                     using with version 7 this attribute should be set to
                     "weblogic.ejbc" to avoid the deprecation warning.
    No.

    jvmargs
    Any additional arguments to be passed to the Virtual Machine
                     running weblogic.ejbc tool. For example to set the memory size,
                     this could be jvmargs="-Xmx128m"

    No.

    jvmdebuglevel
    Sets the weblogic.StdoutSeverityLevel to use when running
                     the Virtual Machine that executes ejbc. Set to 16 to avoid
                     the warnings about EJB Home and Remotes being in the classpath

    No.

    outputdir
    If set ejbc will be given this directory as the output
                     destination rather than a jar file. This allows for the
                     generation of "exploded" jars.

    No.

The weblogic nested element supports three nested elements. The
first two, <classpath> and <wlclasspath>, are used to set the
respective classpaths. These nested elements are useful when setting up
class paths using reference Ids. The last, <sysproperty>, allows
Java system properties to be set during the compiler run. This turns out
to be necessary for supporting CMP EJB compilation in all environments.

TOPLink for Weblogic element

Deprecated

The toplink element is no longer required. Toplink beans can now be built with the standard
weblogic element, as long as the newCMP attribute is set to "true"

The TopLink element is used to handle beans which use Toplink for the CMP operations. It
is derived from the standard weblogic element so it supports the same set of attributes plus these
additional attributes

    Attribute
    Description
    Required

    toplinkdescriptor
    This specifies the name of the TOPLink deployment descriptor file contained in the
                     'descriptordir' directory.
    Yes

    toplinkdtd
    This specifies the location of the TOPLink DTD file. This can be a file path or
                     a file URL. This attribute is not required, but using a local DTD is recommended.
    No, defaults to dtd file at www.objectpeople.com.

Examples

This example shows ejbjar being used to generate deployment jars using a
Weblogic EJB container. This example requires the naming standard to be used for
the deployment descriptors. Using this format will create a ejb jar file for
each variation of '*-ejb-jar.xml' that is found in the deployment descriptor
directory.

    <ejbjar srcdir="${build.classes}"
            descriptordir="${descriptor.dir}">
      <weblogic destdir="${deploymentjars.dir}"
                classpath="${descriptorbuild.classpath}"/>
      <include name="**/*-ejb-jar.xml"/>
      <exclude name="**/*weblogic*.xml"/>
    </ejbjar>

If weblogic is not in the Ant classpath, the following example
shows how to specify the location of the weblogic DTDs. This
example also show the use of a nested classpath element.

    <ejbjar descriptordir="${src.dir}" srcdir="${build.classes}">
       <weblogic destdir="${deployment.webshop.dir}"
                 keepgeneric="true"
                 args="-g -keepgenerated ${ejbc.compiler}"
                 suffix=".jar"
                 oldCMP="false">
         <classpath>
           <pathelement path="${descriptorbuild.classpath}"/>
         </classpath>
       </weblogic>
       <include name="**/*-ejb-jar.xml"/>
       <exclude name="**/*-weblogic-ejb-jar.xml"/>
       <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
            location="${weblogic.home}/classes/weblogic/ejb/deployment/xml/ejb-jar.dtd"/>
       <dtd publicId="-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN"
            location="${weblogic.home}/classes/weblogic/ejb/deployment/xml/weblogic-ejb-jar.dtd"/>
    </ejbjar>

This example shows ejbjar being used to generate a single deployment jar
using a Weblogic EJB container. This example does not require the deployment
descriptors to use the naming standard. This will create only one ejb jar file -
'TheEJBJar.jar'.

    <ejbjar srcdir="${build.classes}"
            descriptordir="${descriptor.dir}"
            basejarname="TheEJBJar">
      <weblogic destdir="${deploymentjars.dir}"
                classpath="${descriptorbuild.classpath}"/>
      <include name="**/ejb-jar.xml"/>
      <exclude name="**/weblogic*.xml"/>
    </ejbjar>

This example shows ejbjar being used to generate deployment jars for a TOPLink-enabled entity bean using a
Weblogic EJB container. This example does not require the deployment descriptors to use the naming standard.
This will create only one TOPLink-enabled ejb jar file - 'Address.jar'.

    <ejbjar srcdir="${build.dir}"
            destdir="${solant.ejb.dir}"
            descriptordir="${descriptor.dir}"
            basejarname="Address">
            <weblogictoplink destdir="${solant.ejb.dir}"
                    classpath="${java.class.path}"
                    keepgeneric="false"
                    toplinkdescriptor="Address.xml"
                    toplinkdtd="file:///dtdfiles/toplink-cmp_2_5_1.dtd"
                    suffix=".jar"/>
            <include name="**/ejb-jar.xml"/>
            <exclude name="**/weblogic-ejb-jar.xml"/>
    </ejbjar>

This final example shows how you would set-up ejbjar under Weblogic 6.0. It also shows the use of the
<support> element to add support files

    <ejbjar descriptordir="${dd.dir}" srcdir="${build.classes.server}">
       <include name="**/*-ejb-jar.xml"/>
       <exclude name="**/*-weblogic-ejb-jar.xml"/>
       <support dir="${build.classes.server}">
            <include name="**/*.class"/>
       </support>
       <weblogic destdir="${deployment.dir}"
                 keepgeneric="true"
                 suffix=".jar"
                 rebuild="false">
         <classpath>
            <pathelement path="${build.classes.server}"/>
         </classpath>
         <wlclasspath>
            <pathelement path="${weblogic.classes}"/>
         </wlclasspath>
       </weblogic>
    </ejbjar>

WebSphere element

The websphere element searches for the websphere specific deployment descriptors and
adds them to the final ejb jar file. Websphere has two specific descriptors for session
beans:

ibm-ejb-jar-bnd.xmi

ibm-ejb-jar-ext.xmi

and another two for container managed entity beans:

Map.mapxmi

Schema.dbxmi

In terms of WebSphere, the generation of container code and stubs is called deployment.
This step can be performed by the websphere element as part of the jar generation process. If the
switch ejbdeploy is on, the ejbdeploy tool from the websphere toolset is called for
every ejb-jar. Unfortunately, this step only works, if you use the ibm jdk. Otherwise, the rmic
(called by ejbdeploy) throws a ClassFormatError. Be sure to switch ejbdeploy off, if run ant with
sun jdk.

For the websphere element to work, you have to provide a complete classpath, that contains all
classes, that are required to reflect the bean classes. For ejbdeploy to work, you must also provide
the classpath of the ejbdeploy tool and set the websphere.home property (look at the examples below).

    Attribute
    Description
    Required

    destdir
    The base directory into which the generated weblogic ready
                     jar files are deposited. Jar files are deposited in
                     directories corresponding to their location within the
                     descriptordir namespace.
    Yes

    ejbdeploy
    Decides whether ejbdeploy is called. When you set this to true,
                     be sure, to run ant with the ibm jdk.
    No, defaults to true

    suffix
    String value appended to the basename of the deployment
                     descriptor to create the filename of the WebLogic EJB
                     jar file.
    No, defaults to '.jar'.

    keepgeneric
    This controls whether the generic file used as input to
                     ejbdeploy is retained.
    No, defaults to false

    rebuild
    This controls whether ejbdeploy is called although no changes
                     have occurred.
    No, defaults to false

    tempdir
    A directory, where ejbdeploy will write temporary files
    No, defaults to '_ejbdeploy_temp'.

    dbName
dbSchema
    These options are passed to ejbdeploy.
    No

    dbVendor
    This option is passed to ejbdeploy.

                   Valid options can be obtained by running the following command:

                   <WAS_HOME>/bin/EJBDeploy.[sh/bat] -help

                    This is also used to determine the name of the Map.mapxmi and
                     Schema.dbxmi files, for example Account-DB2UDBWIN_V71-Map.mapxmi
                     and Account-DB2UDBWIN_V71-Schema.dbxmi.

    No

    codegen
quiet
novalidate
noinform
trace

                     use35MappingRules
    These options are all passed to ejbdeploy. All options
                     except 'quiet' default to false.
    No

    rmicOptions
    This option is passed to ejbdeploy and will be passed
                     on to rmic.
    No

This example shows ejbjar being used to generate deployment jars for all deployment descriptors
in the descriptor dir:

    <property name="websphere.home" value="${was4.home}"/>
    <ejbjar srcdir="${build.class}" descriptordir="etc/ejb">
      <include name="*-ejb-jar.xml"/>
      <websphere dbvendor="DB2UDBOS390_V6"
                 ejbdeploy="true"
                 oldCMP="false"
                 tempdir="/tmp"
                 destdir="${dist.server}">
        <wasclasspath>
          <pathelement location="${was4.home}/deploytool/itp/plugins/org.eclipse.core.boot/boot.jar"/>
          <pathelement location="${was4.home}/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime/batch.jar"/>
          <pathelement location="${was4.home}/lib/xerces.jar"/>
          <pathelement location="${was4.home}/lib/ivjejb35.jar"/>
          <pathelement location="${was4.home}/lib/j2ee.jar"/>
          <pathelement location="${was4.home}/lib/vaprt.jar"/>
        </wasclasspath>
        <classpath>
          <path refid="build.classpath"/>
        </classpath>
      </websphere>
      <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
           location="${lib}/dtd/ejb-jar_1_1.dtd"/>
    </ejbjar>

iPlanet Application Server (iAS) element

The <iplanet< nested element is used to build iAS-specific stubs and

skeletons and construct a JAR file which may be deployed to the iPlanet
Application Server 6.0.  The build process will always determine if
the EJB stubs/skeletons and the EJB-JAR file are up to date, and it will
do the minimum amount of work required.

Like the WebLogic element, a naming convention for the EJB descriptors
is most commonly used to specify the name for the completed JAR file.
For example, if the EJB descriptor ejb/Account-ejb-jar.xml is found in
the descriptor directory, the iplanet element will search for an iAS-specific
EJB descriptor file named ejb/Account-ias-ejb-jar.xml (if it isn't found,
the task will fail) and a JAR file named ejb/Account.jar will be written
in the destination directory.  Note that when the EJB descriptors
are added to the JAR file, they are automatically renamed META-INF/ejb-jar.xml
and META-INF/ias-ejb-jar.xml.

Of course, this naming behaviour can be modified by specifying attributes
in the ejbjar task (for example, basejarname, basenameterminator, and flatdestdir)
as well as the iplanet element (for example, suffix).  Refer to the
appropriate documentation for more details.

Parameters:

Attribute

Description

Required

destdir

The base directory into which the generated JAR files will
be written. Each JAR file is written in directories which correspond to
their location within the "descriptordir" namespace.

Yes

classpath

The classpath used when generating EJB stubs and skeletons.
If omitted, the classpath specified in the "ejbjar" parent task will be
used.  If specified, the classpath elements will be prepended to the
classpath specified in the parent "ejbjar" task. Note that nested "classpath"
elements may also be used.

No

keepgenerated

Indicates whether or not the Java source files which are
generated by ejbc will be saved or automatically deleted. If "yes", the
source files will be retained.  If omitted, it defaults to "no".

No

debug

Indicates whether or not the ejbc utility should log additional debugging
statements to the standard output. If "yes", the additional debugging statements
will be generated.  If omitted, it defaults to "no".

No

iashome

May be used to specify the "home" directory for this iAS installation.
This is used to find the ejbc utility if it isn't included in the user's
system path.  If specified, it should refer to the [install-location]/iplanet/ias6/ias
directory.  If omitted, the ejbc utility must be on the user's system
path.

No

suffix

String value appended to the JAR filename when creating each JAR.
If omitted, it defaults to ".jar".

No

As noted above, the iplanet element supports additional <classpath>
nested elements.

Examples

This example demonstrates the typical use of the <iplanet> nested element.
It will name each EJB-JAR using the "basename" prepended to each standard
EJB descriptor.  For example, if the descriptor named "Account-ejb-jar.xml"
is processed, the EJB-JAR will be named "Account.jar"

    <ejbjar srcdir="${build.classesdir}"
            descriptordir="${src}">

            <iplanet destdir="${assemble.ejbjar}"
                     classpath="${ias.ejbc.cpath}"/>
            <include name="**/*-ejb-jar.xml"/>
            <exclude name="**/*ias-*.xml"/>
    </ejbjar>

This example demonstrates the use of a nested classpath element as well
as some of the other optional attributes.

    <ejbjar srcdir="${build.classesdir}"
            descriptordir="${src}">

            <iplanet destdir="${assemble.ejbjar}"
                     iashome="${ias.home}"
                     debug="yes"
                     keepgenerated="yes">
                     <classpath>
                         <pathelement path="."/>
                         <pathelement path="${build.classpath}"/>
                     </classpath>
            </iplanet>
            <include name="**/*-ejb-jar.xml"/>
            <exclude name="**/*ias-*.xml"/>
    </ejbjar>

This example demonstrates the use of basejarname attribute.  In this
case, the completed EJB-JAR will be named "HelloWorld.jar"  If multiple
EJB descriptors might be found, care must be taken to ensure that the completed
JAR files don't overwrite each other.

    <ejbjar srcdir="${build.classesdir}"
            descriptordir="${src}"
            basejarname="HelloWorld">

            <iplanet destdir="${assemble.ejbjar}"
                     classpath="${ias.ejbc.cpath}"/>
            <include name="**/*-ejb-jar.xml"/>
            <exclude name="**/*ias-*.xml"/>
    </ejbjar>

This example demonstrates the use of the dtd nested element. If the local
copies of the DTDs are included in the classpath, they will be automatically
referenced without the nested elements.  In iAS 6.0 SP2, these local DTDs are
found in the [iAS-install-directory]/APPS directory.  In iAS 6.0 SP3, these
local DTDs are found in the [iAS-install-directory]/dtd directory.

    <ejbjar srcdir="${build.classesdir}"
            descriptordir="${src}">
            <iplanet destdir="${assemble.ejbjar}">
                     classpath="${ias.ejbc.cpath}"/>
            <include name="**/*-ejb-jar.xml"/>
            <exclude name="**/*ias-*.xml"/>

            <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
                 location="${ias.home}/APPS/ejb-jar_1_1.dtd"/>
            <dtd publicId="-//Sun Microsystems, Inc.//DTD iAS Enterprise JavaBeans 1.0//EN"
                 location="${ias.home}/APPS/IASEjb_jar_1_0.dtd"/>
    </ejbjar>

JOnAS (Java Open Application Server) element

The <jonas> nested element is used to build JOnAS-specific stubs and
skeletons thanks to the GenIC specific tool, and construct a JAR
file which may be deployed to the JOnAS Application Server. The build process
will always determine if the EJB stubs/skeletons and the EJB-JAR file are up to
date, and it will do the minimum amount of work required.

Like the WebLogic element, a naming convention for the EJB descriptors is
most commonly used to specify the name for the completed JAR file. For example,
if the EJB descriptor ejb/Account-ejb-jar.xml is found in the
descriptor directory, the <jonas> element will search for a JOnAS-specific
EJB descriptor file named ejb/Account-jonas-ejb-jar.xml and a JAR
file named ejb/Account.jar will be written in the destination
directory. But the <jonas> element can also use the JOnAS naming
convention. With the same example as below, the EJB descriptor can also be named
ejb/Account.xml (no base name terminator here) in the descriptor
directory. Then the <jonas> element will search for a JOnAS-specific EJB
descriptor file called ejb/jonas-Account.xml. This convention do
not follow strictly the ejb-jar naming convention recommendation but is
supported for backward compatibility with previous version of JOnAS.

Note that when the EJB descriptors are added to the JAR file, they are
automatically renamed META-INF/ejb-jar.xml and
META-INF/jonas-ejb-jar.xml.

Of course, this naming behavior can be modified by specifying attributes in
the ejbjar task (for example, basejarname, basenameterminator, and flatdestdir)
as well as the iplanet element (for example, suffix). Refer to the appropriate
documentation for more details.

 Parameters:

      Attribute
      Description
      Required

      destdir
      The base directory into which the generated JAR files
      will be written. Each JAR file is written in directories which correspond
      to their location within the "descriptordir" namespace.
      Yes

      jonasroot
      The root directory for JOnAS.
      Yes

      classpath
      The classpath used when generating EJB stubs and
      skeletons. If omitted, the classpath specified in the "ejbjar" parent
      task will be used. If specified, the classpath elements will be prepended
      to the classpath specified in the parent "ejbjar" task (see also the ORB
      attribute documentation below). Note that nested "classpath" elements may
      also be used.
      No

      keepgenerated
      true if the intermediate Java
      source files generated by GenIC must be deleted or not. If
      omitted, it defaults to false.
      No

      nocompil
      true if the generated source files
      must not be compiled via the java and rmi compilers. If omitted,
      it defaults to false.
      No

      novalidation
      true if the XML deployment descriptors must
      be parsed without validation. If omitted, it defaults to false.
      No

      javac
      Java compiler to use. If omitted, it defaults
      to the value of build.compiler property.
      No

      javacopts
      Options to pass to the java compiler.
      No

      rmicopts
      Options to pass to the rmi compiler.
      No

      secpropag
      true if the RMI Skel. and
      Stub. must be modified to implement the implicit propagation of
      the security context (the transactional context is always
      provided). If omitted, it defaults to false.
      No

      verbose
      Indicates whether or not to use -verbose switch. If
      omitted, it defaults to false.
      No

      additionalargs
      Add additional args to GenIC.
      No

      keepgeneric
      true if the generic JAR file used as input
      to GenIC must be retained. If omitted, it defaults to false.
      No

      jarsuffix
      String value appended to the JAR filename when creating each JAR.  If
      omitted, it defaults to ".jar".
      No

      orb
      Choose your ORB : RMI, JEREMIE, DAVID. If omitted, it defaults to the
      one present in classpath. If specified, the corresponding JOnAS JAR is
      automatically added to the classpath.
      No

      nogenic
      If this attribute is set to true,
      JOnAS's GenIC will not be run on the EJB JAR. Use this if you
      prefer to run GenIC at deployment time. If omitted, it defaults
      to false.
      No

As noted above, the jonas element supports additional <classpath>
nested elements.

Examples

This example shows ejbjar being used to generate deployment jars using a
JOnAS EJB container. This example requires the naming standard to be used for
the deployment descriptors. Using this format will create a EJB JAR file for
each variation of  '*-jar.xml' that is found in the deployment descriptor
directory.

      <ejbjar srcdir="${build.classes}"
              descriptordir="${descriptor.dir}">
        <jonas destdir="${deploymentjars.dir}"
             jonasroot="${jonas.root}"
             orb="RMI"/>
        <include name="**/*.xml"/>
        <exclude name="**/jonas-*.xml"/>
        <support dir="${build.classes}">
             <include name="**/*.class"/>
        </support>
      </ejbjar>

This example shows ejbjar being used to generate a single deployment jar
using a JOnAS EJB container. This example does require the deployment
descriptors to use the naming standard. This will create only one ejb jar file -
'TheEJBJar.jar'.

      <ejbjar srcdir="${build.classes}"
              descriptordir="${descriptor.dir}"
              basejarname="TheEJBJar">
        <jonas destdir="${deploymentjars.dir}"
                  jonasroot="${jonas.root}"
                  suffix=".jar"
                  classpath="${descriptorbuild.classpath}"/>
        <include name="**/ejb-jar.xml"/>
        <exclude name="**/jonas-ejb-jar.xml"/>
      </ejbjar>


text:
#pragma warning disable SA1402
#pragma warning disable SA1649

namespace InterfaceSplittingFacility.IntegrationTest.FailingExplicitDeclaration
{
    using System;
    using Castle.MicroKernel.Registration;
    using Castle.Windsor;
    using Microsoft.VisualStudio.TestTools.UnitTesting;

    public interface IBig
    {
        bool SmallProperty1 { get; set; }

        int SmallMethod1();

        int SmallMethod2();

        int SmallMethod3();

        int SmallMethod4();
    }

    public interface ISmall1
    {
        bool SmallProperty1 { get; set; }
    }

    public interface ISmall2
    {
        int SmallMethod2();

        int SmallMethod3();
    }

    public interface ISmall3
    {
        int SmallMethod4();
    }

    [TestClass]
    public class BasicExplicitDeclaration
    {
        [TestMethod]
        public void AssertIt()
        {
            var container = new WindsorContainer().AddFacility<InterfaceSplittingFacility>();

            container.Register(
                Component.For<ISmall1>().ImplementedBy<DefaultSmall1>().LifestyleTransient(),
                Component.For<ISmall2>().ImplementedBy<DefaultSmall2>().LifestyleTransient(),
                Component.For<ISmall3>().ImplementedBy<DefaultSmall3>().LifestyleTransient(),
                Component.For<IBig>().ImplementedAsSplittedInterfaceBy<IBig, ISmall1, ISmall2, ISmall3>()
                );

            var instance = container.Resolve<IBig>();
            instance.SmallProperty1 = true;

            Assert.AreEqual(instance.SmallProperty1, true);
            Assert.AreEqual(instance.SmallMethod2(), 2);
            Assert.AreEqual(instance.SmallMethod3(), 3);
            Assert.AreEqual(instance.SmallMethod4(), 4);

            try
            {
                instance.SmallMethod1();
            }
            catch (NotImplementedException)
            {
                return;
            }

            Assert.Fail();
        }
    }

    public class DefaultSmall1 : ISmall1
    {
        public bool SmallProperty1 { get; set; }

        public int SmallMethod1()
        {
            return 1;
        }
    }

    public class DefaultSmall2 : ISmall2
    {
        public int SmallMethod2()
        {
            return 2;
        }

        public int SmallMethod3()
        {
            return 3;
        }
    }

    public class DefaultSmall3 : ISmall3
    {
        public int SmallMethod4()
        {
            return 4;
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Blue Dog Art Template</title>

  <link href="/css/bootstrap-theme.min.css" rel="stylesheet" />
  <link href="/css/bootstrap.min.css" rel="stylesheet" />
  <link href="/css/bda01.css" rel="stylesheet" />

          <hgroup class="col-xs-5 col-sm-3 col-md-2 logo">

         </hgroup>

          Follow Us

          <form class="navbar-form text-left" role="search">

            	<input type="text" class="form-control" placeholder="Search" />

        </form>

            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
              Toggle navigation

            </button>

Home (current)

                View Art

View All Art

For Sale Only

Paintings

Photos

Prints

                Artists

Fred Flintstone

Barney Rubble

Dino

Events

Blog

Associates

About Us

Contact Us

Events

   Show/Hide Details

Lymington Art Exhibition "New Forest Ponds, Puddles & Paths"

When: Time and date will appear here

Where: Location will appear here

An exhibition of over 40 paintings, almost all of them new creations, by Pete Gilbert – well renowned Hampshire artist who is passionate about the New Forest.  His paintings play with light and dark, shapes and form and create images of landscapes that we can relate to, that we can see, feel and smell the scent of morning or late afternoon, hear the bird calls, feel the squelchy mud and the prickles of the teasles! It promises to be a wonderful exhibition from 17th January to 28th February at Lymington's St Barbe Museum & Art Gallery.  Booking on line through the Museum.

Address

 Lymington, St Barbe Museum & Art Gallery

New Street

Lymington

SO41 9BH

England

   Show/Hide Details

The Blah Event

When: Time and date will appear here

Where: Location will appear here

Blah blah blah!

Address

 Lymington, St Barbe Museum & Art Gallery

New Street

Lymington

SO41 9BH

England

PROMOS

View All Art

Site Info

Contact Us

Privacy Policy

Terms and Conditions

Sitemap

Newsletter

Newsfeed

Link

Link

Link

Link

Get in touch

Email: info@bluedogart.co.uk

Phone: 079649 55703

          Follow Us

Our Associates:

How PayPal Works

© Copyright 2015.


text:
@interface UIView (MotionEffect)
- (void) jk_addCenterMotionEffectsXYWithOffset:(CGFloat)offset;
@end

@interface UIView (Screenshot)

- (UIImage*) jk_screenshot;
- (UIImage*) jk_screenshotForScrollViewWithContentOffset:(CGPoint)contentOffset;
- (UIImage*) jk_screenshotInFrame:(CGRect)frame;

@end


text:
MACRO(ADD_MSVC_PRECOMPILED_HEADER PrecompiledHeader PrecompiledSource SourcesVar)
  IF(MSVC)
    GET_FILENAME_COMPONENT(PrecompiledBasename ${PrecompiledHeader} NAME_WE)
    SET(PrecompiledBinary "${CMAKE_CFG_INTDIR}/${PrecompiledBasename}.pch")
    SET(Sources ${${SourcesVar}})

    SET_SOURCE_FILES_PROPERTIES(${PrecompiledSource}
      PROPERTIES COMPILE_FLAGS "/Yc\"${PrecompiledHeader}\" /Fp\"${PrecompiledBinary}\""
      OBJECT_OUTPUTS "${PrecompiledBinary}")

    # Do not consider .c files
    foreach(fname ${Sources})
      GET_FILENAME_COMPONENT(fext ${fname} EXT)
      if(fext STREQUAL ".cpp")
	SET_SOURCE_FILES_PROPERTIES(${fname}
	  PROPERTIES COMPILE_FLAGS "/Yu\"${PrecompiledBinary}\" /FI\"${PrecompiledBinary}\" /Fp\"${PrecompiledBinary}\""
          OBJECT_DEPENDS "${PrecompiledBinary}")
      endif(fext STREQUAL ".cpp")
    endforeach(fname)

  ENDIF(MSVC)
  # Add precompiled header to SourcesVar
  LIST(APPEND ${SourcesVar} ${PrecompiledSource})

ENDMACRO(ADD_MSVC_PRECOMPILED_HEADER)


text:
import React from 'react'
import { ActionSearch, ContentSave, ActionInfoOutline } from 'material-ui/svg-icons'
import BottomNavigationLink from './BottomNavigationLink'

const Footer = () => {
  return (
    <footer className='app__footer'>
      <nav className='bottom-navigation'>
        <BottomNavigationLink
          className='bottom-navigation__link'
          to='/'
          label='Search'
          activeOnlyWhenExact
          icon={
            <ActionSearch />
          } />
        <BottomNavigationLink
          className='bottom-navigation__link'
          to='/skipasses'
          label='Skipasses'
          icon={
            <ContentSave />
          } />
        <BottomNavigationLink
          className='bottom-navigation__link'
          to='/about'
          label='About'
          icon={
            <ActionInfoOutline />
          } />
      </nav>
    </footer>
  )
}

export default Footer


text:
package org.apache.camel.component.mail;

import java.util.HashMap;
import java.util.Map;

import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit4.CamelTestSupport;
import org.junit.Test;
import org.jvnet.mock_javamail.Mailbox;

public class MailNameAndEmailInRecipientTest extends CamelTestSupport {

    @Test
    public void testSendWithNameAndEmailInRecipient() throws Exception {
        Mailbox.clearAll();

        // START SNIPPET: e1
        Map<String, Object> headers = new HashMap<String, Object>();
        headers.put("to", "Claus Ibsen <davsclaus@localhost>");
        headers.put("cc", "James Strachan <jstrachan@localhost>");

        assertMailbox("davsclaus");
        assertMailbox("jstrachan");

        template.sendBodyAndHeaders("smtp://localhost", "Hello World", headers);
        // END SNIPPET: e1

        assertMockEndpointsSatisfied();
    }

    private void assertMailbox(String name) throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:" + name);
        mock.expectedBodiesReceived("Hello World");
        mock.message(0).header("to").isEqualTo("Claus Ibsen <davsclaus@localhost>");
        mock.message(0).header("cc").isEqualTo("James Strachan <jstrachan@localhost>");
    }

    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            public void configure() throws Exception {
                from("pop3://davsclaus@localhost?consumer.initialDelay=100&consumer.delay=100").to("mock:davsclaus");

                from("pop3://jstrachan@localhost?consumer.initialDelay=100&consumer.delay=100").to("mock:jstrachan");
            }
        };
    }

}


text:
using UnityEngine;
using System.Collections;

public class GameManager : MonoBehaviour
{
    private static int stateNumber;
	public static GameState currentState;                      // State Numbers
    public StateGameIntro stateGameIntro { get; set; }  // 0
    public StateGameMenu stateGameMenu { get; set; }    // 1
	public StateGamePlaying stateGamePlaying{get;set;}  // 2
	public StateGameWon stateGameWon{get;set;}          // 3
	public StateGameLost stateGameLost{get;set;}        // 4

    private static GameManager instance = null;
    public static GameManager Instance { get { return instance; } }

	private void Awake ()
	{
        DontDestroyOnLoad(this.gameObject);
        if (instance != null && instance != this)
        {
            Destroy(this.gameObject);
            return;
        }
        else
        {
            instance = this;
        }

        stateGameIntro = new StateGameIntro(this);
        stateGameMenu = new StateGameMenu(this);
		stateGamePlaying = new StateGamePlaying(this);
		stateGameWon = new StateGameWon(this);
		stateGameLost = new StateGameLost(this);
	}

	private void Start ()
	{
		NewGameState( stateGameIntro );
        stateNumber = 0;
	}

	private void Update ()
	{
		if (currentState != null)
		{
			currentState.StateUpdate();
		}
	}

	private void OnGUI ()
	{
		if (currentState != null)
		{
			currentState.StateGUI();
		}
	}

	public void NewGameState(GameState newState)
	{
		if( null != currentState)
		{
			currentState.OnStateExit();
		}
		currentState = newState;
		currentState.OnStateEntered();

        if(currentState == stateGameIntro)
        {
            stateNumber = 0;
        }
        else if(currentState == stateGameMenu)
        {
            stateNumber = 1;
        }
        else if(currentState == stateGamePlaying)
        {
            stateNumber = 2;
        }
        else if(currentState == stateGameWon)
        {
            stateNumber = 3;
        }
        else if (currentState == stateGameLost)
        {
            stateNumber = 4;
        }
	}
    //take out when not needed
    public static bool IsPlaying()
    {
        if (GameManager.currentState == GameManager.Instance.stateGamePlaying)
        {
            return true;
        }
        return false;
    }

    public static bool IsMenu()
    {
        if (GameManager.currentState == GameManager.Instance.stateGameMenu)
        {
            return true;
        }
        return false;
    }

    public static string WhatState()
    {
        switch(stateNumber)
        {
            case 0:
                return "intro";
            case 1:
                return "menu";
            case 2:
                return "playing";
            case 3:
                return "won";
            case 4:
                return "lost";
        }
        return " ";
    }

    public static void SetPlaying()
    {
        GameManager.currentState = GameManager.Instance.stateGamePlaying;
        Application.LoadLevel("game");
    }
}


text:
"""

@author: Adam Reinhold Von Fisher - https://www.linkedin.com/in/adamrvfisher/

"""

#This is a modified version of DatabaseGrabber - a query tool

#Define fucntion
def ModDatabaseGrabber(ticker):
    #Import modules
    import pandas as pd
    #It will be neccessary for you to change the location of the working directory
    #in order to load the data into the model. Please modify to match the destination
    #of the working directory folder
    #Read in data
    dataframe = pd.read_pickle('F:\\Users\\Username\\DirectoryLocation\\PriceHistory\\' +
                  ticker)
    #For all column's values
    for i in dataframe.columns:
        #Change data type to numeric
        dataframe[i] =  pd.to_numeric(dataframe[i], errors='coerce')
    #Delete duplicate columns + rows
    dataframe = dataframe.loc[:,~dataframe.columns.duplicated()]
    dataframe = dataframe[~dataframe.index.duplicated(keep='first')]
    #Output table
    return dataframe


text:
import createSlicer from './createSlicer.js'
import mergeState from './util/mergeState.js'
import Cookies from 'universal-cookie';

/**
 * @description
 * persistState is a Store Enhancer that syncs (a subset of) store state to cookie.
 *
 * @param {String|String[]} [paths] Specify keys to sync with cookie, if left undefined the whole store is persisted
 * @param {Object} [config] Optional config object
 * @param {String} [config.key="redux"] String used as cookie key
 * @param {Function} [config.slicer] (paths) => (state) => subset. A function that returns a subset
 * of store state that should be persisted to cookie
 *
 * @return {Function} An enhanced store
 */
export default function persistState(paths, config) {
    const cookies = new Cookies();

    const cfg = {
        key: 'redux',
        merge: mergeState,
        slicer: createSlicer,
        cookieOptions: {
            path: '/'
        },
        ...config
    }

    const {key, merge, slicer, cookieOptions} = cfg

    return next => (reducer, initialState, enhancer) => {
        if (typeof initialState === 'function' && typeof enhancer === 'undefined') {
            enhancer = initialState
            initialState = undefined
        }

        let persistedState
        let finalInitialState

        try {
            persistedState = cookies.get(key)
            finalInitialState = merge(initialState, persistedState)
        } catch ( e ) {
            console.warn('Failed to retrieve initialize state from cookie:', e)
        }

        const store = next(reducer, finalInitialState, enhancer)
        const slicerFn = slicer(paths)

        store.subscribe(function() {
            const state = store.getState()
            const subset = slicerFn(state)

            try {
                cookies.set(key, subset, cookieOptions);
            } catch ( e ) {
                console.warn('Unable to persist state to cookie:', e)
            }
        })

        return store
    }
}


text:
<?php

namespace BetterReflectionTest\Reflection;

use BetterReflection\Reflection\ReflectionProperty;
use BetterReflection\Reflector\ClassReflector;
use BetterReflection\SourceLocator\ComposerSourceLocator;
use phpDocumentor\Reflection\Types;

/**
 * @covers \BetterReflection\Reflection\ReflectionProperty
 */
class ReflectionPropertyTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var ClassReflector
     */
    private $reflector;

    public function setUp()
    {
        global $loader;
        $this->reflector = new ClassReflector(new ComposerSourceLocator($loader));
    }

    public function testVisibilityMethods()
    {
        $classInfo = $this->reflector->reflect('\BetterReflectionTest\Fixture\ExampleClass');

        $privateProp = $classInfo->getProperty('privateProperty');
        $this->assertTrue($privateProp->isPrivate());

        $protectedProp = $classInfo->getProperty('protectedProperty');
        $this->assertTrue($protectedProp->isProtected());

        $publicProp = $classInfo->getProperty('publicProperty');
        $this->assertTrue($publicProp->isPublic());
    }

    public function testIsStatic()
    {
        $classInfo = $this->reflector->reflect('\BetterReflectionTest\Fixture\ExampleClass');

        $publicProp = $classInfo->getProperty('publicProperty');
        $this->assertFalse($publicProp->isStatic());

        $staticProp = $classInfo->getProperty('publicStaticProperty');
        $this->assertTrue($staticProp->isStatic());
    }

    /**
     * @return array
     */
    public function stringTypesDataProvider()
    {
        return [
            ['privateProperty', ['int', 'float', '\stdClass']],
            ['protectedProperty', ['bool', 'bool[]', 'bool[][]']],
            ['publicProperty', ['string']],
        ];
    }

    /**
     * @param string $propertyName
     * @param string[] $expectedTypes
     * @dataProvider stringTypesDataProvider
     */
    public function testGetDocBlockTypeStrings($propertyName, $expectedTypes)
    {
        $classInfo = $this->reflector->reflect('\BetterReflectionTest\Fixture\ExampleClass');

        $property = $classInfo->getProperty($propertyName);

        $this->assertSame($expectedTypes, $property->getDocBlockTypeStrings());
    }

    /**
     * @return array
     */
    public function typesDataProvider()
    {
        return [
            ['privateProperty', [Types\Integer::class, Types\Float_::class, Types\Object_::class]],
            ['protectedProperty', [Types\Boolean::class, Types\Array_::class, Types\Array_::class]],
            ['publicProperty', [Types\String_::class]],
        ];
    }

    /**
     * @param string $propertyName
     * @param string[] $expectedTypes
     * @dataProvider typesDataProvider
     */
    public function testGetDocBlockTypes($propertyName, $expectedTypes)
    {
        $classInfo = $this->reflector->reflect('\BetterReflectionTest\Fixture\ExampleClass');

        $foundTypes = $classInfo->getProperty($propertyName)->getDocBlockTypes();

        $this->assertCount(count($expectedTypes), $foundTypes);

        foreach ($expectedTypes as $i => $expectedType) {
            $this->assertInstanceOf($expectedType, $foundTypes[$i]);
        }
    }

    public function testGetDocComment()
    {
        $expectedDoc = "/**\n * @var string\n */";

        $classInfo = $this->reflector->reflect('\BetterReflectionTest\Fixture\ExampleClass');
        $property = $classInfo->getProperty('publicProperty');

        $this->assertSame($expectedDoc, $property->getDocComment());
    }

    public function testExportThrowsException()
    {
        $this->setExpectedException(\Exception::class);
        ReflectionProperty::export();
    }

    public function modifierProvider()
    {
        return [
            ['publicProperty', \ReflectionProperty::IS_PUBLIC, ['public']],
            ['protectedProperty', \ReflectionProperty::IS_PROTECTED, ['protected']],
            ['privateProperty', \ReflectionProperty::IS_PRIVATE, ['private']],
            ['publicStaticProperty', \ReflectionProperty::IS_PUBLIC | \ReflectionProperty::IS_STATIC, ['public', 'static']],
        ];
    }

    /**
     * @param string $propertyName
     * @param int $expectedModifier
     * @param string[] $expectedModifierNames
     * @dataProvider modifierProvider
     */
    public function testGetModifiers($propertyName, $expectedModifier, array $expectedModifierNames)
    {
        $classInfo = $this->reflector->reflect('\BetterReflectionTest\Fixture\ExampleClass');
        $property = $classInfo->getProperty($propertyName);

        $this->assertSame($expectedModifier, $property->getModifiers());
        $this->assertSame(
            $expectedModifierNames,
            \Reflection::getModifierNames($property->getModifiers())
        );
    }

    public function testIsDefault()
    {
        $classInfo = $this->reflector->reflect('\BetterReflectionTest\Fixture\ExampleClass');

        $this->assertTrue($classInfo->getProperty('publicProperty')->isDefault());
        $this->assertFalse($classInfo->getProperty('publicStaticProperty')->isDefault());
    }

    public function castToStringProvider()
    {
        return [
            ['publicProperty', 'Property [ <default> public $publicProperty ]'],
            ['protectedProperty', 'Property [ <default> protected $protectedProperty ]'],
            ['privateProperty', 'Property [ <default> private $privateProperty ]'],
            ['publicStaticProperty', 'Property [ public static $publicStaticProperty ]'],
        ];
    }

    /**
     * @param string $propertyName
     * @param string $expectedString
     * @dataProvider castToStringProvider
     */
    public function testCastingToString($propertyName, $expectedString)
    {
        $classInfo = $this->reflector->reflect('\BetterReflectionTest\Fixture\ExampleClass');
        $this->assertSame($expectedString, (string)$classInfo->getProperty($propertyName));
    }
}


text:
/**
 * Author :Bharathi Nalla
 * 08/01/2014  9:20:41 AM
 *
 */
package com.itreddys.evillage.util;

/**
 * Email Properties bean
 */
public class EmailProperties {
	String sender = new String();
	String password = new String();
	String host = new String();
	String port = new String();

	/**
	 * @return the sender
	 */
	public String getSender() {
		return sender;
	}

	/**
	 * @param sender
	 *            the sender to set
	 */
	public void setSender(String sender) {
		this.sender = sender;
	}

	/**
	 * @return the password
	 */
	public String getPassword() {
		return password;
	}

	/**
	 * @param password
	 *            the password to set
	 */
	public void setPassword(String password) {
		this.password = password;
	}

	/**
	 * @return the host
	 */
	public String getHost() {
		return host;
	}

	/**
	 * @param host
	 *            the host to set
	 */
	public void setHost(String host) {
		this.host = host;
	}

	/**
	 * @return the port
	 */
	public String getPort() {
		return port;
	}

	/**
	 * @param port
	 *            the port to set
	 */
	public void setPort(String port) {
		this.port = port;
	}

}


text:
package org.kie.workbench.common.stunner.svg.client.shape.view.factory;

import org.kie.workbench.common.stunner.svg.client.shape.view.SVGPrimitiveShape;
import org.kie.workbench.common.stunner.svg.client.shape.view.SVGShapeView;
import org.kie.workbench.common.stunner.svg.client.shape.view.impl.SVGShapeViewImpl;

public class SVGShapeViewBuilderImpl implements SVGShapeViewBuilder {

    @Override
    public SVGShapeView build(final String name,
                              final SVGPrimitiveShape primitiveShape,
                              final double width,
                              final double height,
                              final boolean resizable) {
        return new SVGShapeViewImpl(name, primitiveShape, width, height, resizable);
    }
}


text:
package org.apache.river.test.spec.javaspace.conformance;

import java.util.logging.Level;

// net.jini
import net.jini.core.lease.Lease;
import net.jini.core.transaction.Transaction;
import net.jini.core.event.EventRegistration;

// org.apache.river
import org.apache.river.qa.harness.TestException;
import org.apache.river.qa.harness.QAConfig;
import org.apache.river.qa.harness.Test;

/**
 * TransactionNotifyLeaseFOREVERTest asserts, that for notify with
 * Lease.FOREVER lease time within the non null transaction:
 * 1) A notify request's matching is done as it is for read
 * 2) Writing an entry into a space might generate notifications
 *    to registered objects.
 * 3) When matching entries arrive, the specified RemoteEventListener will
 *    eventually be notified by invoking listener's notify method.
 *
 * @author Mikhail A. Markov
 */
public class TransactionNotifyLeaseFOREVERTest extends TransactionTest {

    /**
     * This method asserts, that for notify with Lease.FOREVER
     * lease time within the non null transaction:
     * 1) A notify request's matching is done as it is for read
     * 2) Writing an entry into a space might generate notifications
     *    to registered objects.
     * 3) When matching entries arrive, the specified RemoteEventListener will
     *    eventually be notified by invoking listener's notify method.
     *
     *
Notes:
For more information see the JavaSpaces specification
     * section 2.7.

     */
    public void run() throws Exception {
        NotifyCounter[] ncs = new NotifyCounter[12];
        EventRegistration[] ers = new EventRegistration[12];
        boolean[] failMatrix = new boolean[12];
        boolean failed = false;
        long[] evMatrix = new long[] {
            3, 3, 3, 0, 0, 0, 0, 0, 9, 6, 6, 9 };
        SimpleEntry sampleEntry1 = new SimpleEntry("TestEntry #1", 1);
        SimpleEntry sampleEntry2 = new SimpleEntry("TestEntry #2", 2);
        SimpleEntry sampleEntry3 = new SimpleEntry("TestEntry #1", 2);
        SimpleEntry template;
        Transaction txn;
        int i;

        // first check that space is empty
        if (!checkSpace(space)) {
            throw new TestException(
                    "Space is not empty in the beginning.");
        }

        // create the non null transaction
        txn = getTransaction();

        // init 3 RemoteEvent counters for each of sample entries
        ncs[0] = new NotifyCounter(sampleEntry1, Lease.FOREVER);
        ncs[1] = new NotifyCounter(sampleEntry2, Lease.FOREVER);
        ncs[2] = new NotifyCounter(sampleEntry3, Lease.FOREVER);

        // init 5 counters with wrong templates
        template = new SimpleEntry("TestEntry #3", 1);
        ncs[3] = new NotifyCounter(template, Lease.FOREVER);

        // 2-nd wrong template
        template = new SimpleEntry("TestEntry #1", 3);
        ncs[4] = new NotifyCounter(template, Lease.FOREVER);

        // 3-rd wrong template
        template = new SimpleEntry("TestEntry #3", 3);
        ncs[5] = new NotifyCounter(template, Lease.FOREVER);

        // 4-th wrong template
        template = new SimpleEntry(null, 3);
        ncs[6] = new NotifyCounter(template, Lease.FOREVER);

        // 5-th wrong template
        template = new SimpleEntry("TestEntry #3", null);
        ncs[7] = new NotifyCounter(template, Lease.FOREVER);

        // init counter with null entry as a template
        ncs[8] = new NotifyCounter(null, Lease.FOREVER);

        // init 3 counters with null values for different fields
        template = new SimpleEntry("TestEntry #1", null);
        ncs[9] = new NotifyCounter(template, Lease.FOREVER);

        // 2-nd template
        template = new SimpleEntry(null, 2);
        ncs[10] = new NotifyCounter(template, Lease.FOREVER);

        // 3-rd template
        template = new SimpleEntry(null, null);
        ncs[11] = new NotifyCounter(template, Lease.FOREVER);

        // now register all counters within the transaction
        for (i = 0; i < 12; i++) {
            ers[i] = space.notify(ncs[i].getTemplate(), txn, ncs[i],
                    ncs[i].getLeaseTime(), null);
	    ers[i] = prepareRegistration(ers[i]);
        }

        // sleep for a while to let all listeners register properly
        Thread.sleep(timeout1);
        logDebugText("now sleeping for " + timeout1
                + " to let all listeners register properly.");

        /*
         * write 3 sample entries to the space 3 times
         * within the transaction
         */
        space.write(sampleEntry1, txn, leaseForeverTime);
        space.write(sampleEntry1, txn, leaseForeverTime);
        space.write(sampleEntry1, txn, leaseForeverTime);
        space.write(sampleEntry2, txn, leaseForeverTime);
        space.write(sampleEntry2, txn, leaseForeverTime);
        space.write(sampleEntry2, txn, leaseForeverTime);
        space.write(sampleEntry3, txn, leaseForeverTime);
        space.write(sampleEntry3, txn, leaseForeverTime);
        space.write(sampleEntry3, txn, leaseForeverTime);
        logDebugText("3 sample entries have been written"
                + " to the space 3 times.");

        // wait for a while to let all listeners get notifications
        logDebugText("now sleeping for " + timeout1
                + " to let all listeners get notifications.");
        Thread.sleep(timeout1);

        // check, that listeners got required number of notifications
        for (i = 0; i < 12; i++) {
            if (ncs[i].getEventsNum(ers[i]) != evMatrix[i]) {
                failed = true;
                failMatrix[i] = true;
            } else {
                failMatrix[i] = false;
            }
        }

        for (i = 0; i < 12; i++) {
            if (failMatrix[i]) {
                logDebugText("FAILED: " + ncs[i] + " has got "
                        + ncs[i].getEventsNum(ers[i])
                        + " notifications instead of " + evMatrix[i]
                        + " required.");
            } else {
                logDebugText(ncs[i].toString() + " has got "
                        + ncs[i].getEventsNum(ers[i])
                        + " notifications as expected");
            }
        }

        // commit the transaction
        txnCommit(txn);

        // check: we fail of pass
        if (failed) {
            throw new TestException(
                    "Not all listeners've got expected number of events.");
        }
    }
}


text:
CXX=g++
WINDLLMAIN=
# -m32 export ARCHFLAGS ="-arch i386"

HOSTOS=$(shell uname | tr A-Z a-z)
ifeq ($(HOSTOS),darwin)
 HIDAPIPATH=./hidapi/mac
 LIBS=-lptypes -framework IOKit -framework CoreFoundation
 LNFLAGS=-arch i386 -dynamiclib -flat_namespace -undefined warning -L.
 CFLAGS=-arch i386 -Wall -O3 -DAPL=1 -DIBM=0 -DLIN=0
else
 ifeq ($(HOSTOS),linux)
  HIDAPIPATH=./hidapi/linux
  LIBS=-lptypes
  LNFLAGS=-shared -rdynamic -nodefaultlibs -L.
  CFLAGS=-march=i386 -Wall -O3 -DAPL=0 -DIBM=0 -DLIN=1 -fvisibility=hidden
 else # windows
  HOSTOS=windows
  HIDAPIPATH=./hidapi/windows
  LIBS=-lptypes -lXPLM -lSetupAPI
  LNFLAGS=-m32 -Wl,-O1 -shared -L. -L./SDK/Libraries/Win/
  CFLAGS=-m32 -DAPL=0 -DIBM=1 -DLIN=0 -Wall -fpermissive
  WINDLLMAIN=SaitekProPanelsWin.o
 endif
endif

# To set user/compiler debug mode (use DPRINTF for stdio): -DDEBUG
# To dynamically check for USB connected saitek panels: -DDO_USBPANEL_CHECK
DEFS=-DXPLM200 -DLOGPRINTF

INCLUDE=-I./include
INCLUDE+=-I./SDK/CHeaders/XPLM
INCLUDE+=-I./include
INCLUDE+=-I./include/ptypes

all:
ifeq ($(HOSTOS),windows)
	$(CXX) -c $(INCLUDE) $(DEFS) $(CFLAGS) SaitekProPanelsWin.cpp
endif
	$(CXX) -c $(INCLUDE) $(DEFS) $(CFLAGS) $(HIDAPIPATH)/hid.c
	$(CXX) -c $(INCLUDE) $(DEFS) $(CFLAGS) multipanel.cpp
	$(CXX) -c $(INCLUDE) $(DEFS) $(CFLAGS) PanelThreads.cpp
	$(CXX) -c $(INCLUDE) $(DEFS) $(CFLAGS) radiopanel.cpp
	$(CXX) -c $(INCLUDE) $(DEFS) $(CFLAGS) SaitekProPanels.cpp
	$(CXX) -c $(INCLUDE) $(DEFS) $(CFLAGS) switchpanel.cpp
	$(CXX) -c $(INCLUDE) $(DEFS) $(CFLAGS) utils.c

	$(CXX) -o SaitekProPanels.xpl hid.o multipanel.o PanelThreads.o radiopanel.o SaitekProPanels.o switchpanel.o utils.o $(WINDLLMAIN) $(LNFLAGS) $(LIBS)

clean:
	$(RM) *.o *.xpl


text:
.class Landroid/webkit/WebViewCore$DrawData;
.super Ljava/lang/Object;
.source "WebViewCore.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Landroid/webkit/WebViewCore;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x8
    name = "DrawData"
.end annotation

# instance fields
.field mBaseLayer:I

.field mContentSize:Landroid/graphics/Point;

.field mFirstLayoutForNonStandardLoad:Z

.field mFocusSizeChanged:Z

.field mMinPrefWidth:I

.field mViewSize:Landroid/graphics/Point;

.field mViewState:Landroid/webkit/WebViewCore$ViewState;

# direct methods
.method constructor <init>()V
    .locals 1

    .prologue
    .line 3377
    invoke-direct/range {p0 .. p0}, Ljava/lang/Object;-><init>()V

    .line 3378
    const/4 v0, 0x0

    iput v0, p0, Landroid/webkit/WebViewCore$DrawData;->mBaseLayer:I

    .line 3379
    new-instance v0, Landroid/graphics/Point;

    invoke-direct {v0}, Landroid/graphics/Point;-><init>()V

    iput-object v0, p0, Landroid/webkit/WebViewCore$DrawData;->mContentSize:Landroid/graphics/Point;

    .line 3380
    return-void
.end method


text:
<!doctype html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title></title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width">

        <link rel="stylesheet" href="styles/bootstrap.css">
        <link rel="stylesheet" href="bower_components/dangle/css/dangle.css">
        <link rel="stylesheet" href="styles/main.css">


text:
package com.validation.manager.core.db;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Javier A. Ortiz Bultron javier.ortiz.78@gmail.com
 */
@Entity
@Table(name = "activity")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Activity.findAll",
            query = "SELECT a FROM Activity a")
    , @NamedQuery(name = "Activity.findById",
            query = "SELECT a FROM Activity a WHERE a.activityPK.id = :id")
    , @NamedQuery(name = "Activity.findByActivityType",
            query = "SELECT a FROM Activity a WHERE a.activityPK.activityType = :activityType")
    , @NamedQuery(name = "Activity.findByActivityTime",
            query = "SELECT a FROM Activity a WHERE a.activityTime = :activityTime")})
public class Activity implements Serializable {

    private static final long serialVersionUID = 1L;
    @EmbeddedId
    protected ActivityPK activityPK;
    @Basic(optional = false)
    @NotNull
    @Column(name = "activity_time")
    @Temporal(TemporalType.TIMESTAMP)
    private Date activityTime;
    @Basic(optional = false)
    @NotNull
    @Lob
    @Size(min = 1, max = 2147483647)
    @Column(name = "description")
    private String description;
    @JoinColumn(name = "activity_type", referencedColumnName = "id",
            insertable = false, updatable = false)
    @ManyToOne(optional = false)
    private ActivityType activityType;
    @JoinColumn(name = "source_user", referencedColumnName = "id")
    @ManyToOne(optional = false)
    private VmUser sourceUser;

    public Activity() {
    }

    public Activity(ActivityPK activityPK) {
        this.activityPK = activityPK;
    }

    public Activity(ActivityPK activityPK, Date activityTime, String description) {
        this.activityPK = activityPK;
        this.activityTime = activityTime;
        this.description = description;
    }

    public Activity(int activityType) {
        this.activityPK = new ActivityPK(activityType);
    }

    public ActivityPK getActivityPK() {
        return activityPK;
    }

    public void setActivityPK(ActivityPK activityPK) {
        this.activityPK = activityPK;
    }

    public Date getActivityTime() {
        return activityTime;
    }

    public void setActivityTime(Date activityTime) {
        this.activityTime = activityTime;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public ActivityType getActivityType() {
        return activityType;
    }

    public void setActivityType(ActivityType activityType) {
        this.activityType = activityType;
    }

    public VmUser getSourceUser() {
        return sourceUser;
    }

    public void setSourceUser(VmUser sourceUser) {
        this.sourceUser = sourceUser;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (activityPK != null ? activityPK.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Activity)) {
            return false;
        }
        Activity other = (Activity) object;
        return !((this.activityPK == null && other.activityPK != null)
                || (this.activityPK != null && !this.activityPK.equals(other.activityPK)));
    }

    @Override
    public String toString() {
        return "com.validation.manager.core.db.Activity[ activityPK=" + activityPK + " ]";
    }
}


text:
using System.Collections.Generic;
using Azure.Core;

namespace Azure.ResourceManager.ContainerInstance.Models
{
    /// <summary> The container Http Get settings, for liveness or readiness probe. </summary>
    public partial class ContainerHttpGet
    {
        /// <summary> Initializes a new instance of ContainerHttpGet. </summary>
        /// <param name="port"> The port number to probe. </param>
        public ContainerHttpGet(int port)
        {
            Port = port;
            HttpHeaders = new ChangeTrackingList<ContainerHttpHeader>();
        }

        /// <summary> Initializes a new instance of ContainerHttpGet. </summary>
        /// <param name="path"> The path to probe. </param>
        /// <param name="port"> The port number to probe. </param>
        /// <param name="scheme"> The scheme. </param>
        /// <param name="httpHeaders"> The HTTP headers. </param>
        internal ContainerHttpGet(string path, int port, ContainerHttpGetScheme? scheme, IList<ContainerHttpHeader> httpHeaders)
        {
            Path = path;
            Port = port;
            Scheme = scheme;
            HttpHeaders = httpHeaders;
        }

        /// <summary> The path to probe. </summary>
        public string Path { get; set; }
        /// <summary> The port number to probe. </summary>
        public int Port { get; set; }
        /// <summary> The scheme. </summary>
        public ContainerHttpGetScheme? Scheme { get; set; }
        /// <summary> The HTTP headers. </summary>
        public IList<ContainerHttpHeader> HttpHeaders { get; }
    }
}


text:
<?php

declare(strict_types=1);

namespace Roave\BetterReflectionTest\SourceLocator\Type\Composer;

use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use Roave\BetterReflection\Identifier\Identifier;
use Roave\BetterReflection\Identifier\IdentifierType;
use Roave\BetterReflection\Reflection\Reflection;
use Roave\BetterReflection\Reflector\DefaultReflector;
use Roave\BetterReflection\Reflector\Reflector;
use Roave\BetterReflection\SourceLocator\Type\Composer\Psr\Psr4Mapping;
use Roave\BetterReflection\SourceLocator\Type\Composer\Psr\PsrAutoloaderMapping;
use Roave\BetterReflection\SourceLocator\Type\Composer\PsrAutoloaderLocator;
use Roave\BetterReflectionTest\Assets\DirectoryScannerAssets\Bar\FooBar;
use Roave\BetterReflectionTest\Assets\DirectoryScannerAssets\Foo;
use Roave\BetterReflectionTest\Assets\DirectoryScannerAssetsFoo\Bar\FooBar as FooBar1;
use Roave\BetterReflectionTest\Assets\DirectoryScannerAssetsFoo\Foo as Foo1;
use Roave\BetterReflectionTest\BetterReflectionSingleton;

use function array_map;
use function sort;

/** @covers \Roave\BetterReflection\SourceLocator\Type\Composer\PsrAutoloaderLocator */
class PsrAutoloaderLocatorTest extends TestCase
{
    /** @var PsrAutoloaderMapping&MockObject */
    private $psrMapping;

    private Reflector $reflector;

    private PsrAutoloaderLocator $psrLocator;

    protected function setUp(): void
    {
        parent::setUp();

        $this->psrMapping = $this->createMock(PsrAutoloaderMapping::class);
        $this->psrLocator = new PsrAutoloaderLocator(
            $this->psrMapping,
            BetterReflectionSingleton::instance()
                ->astLocator(),
        );
        $this->reflector  = new DefaultReflector($this->psrLocator);
        $this
            ->psrMapping
            ->method('directories')
            ->willReturn([
                __DIR__ . '/../../../Assets/DirectoryScannerAssets',
                __DIR__ . '/../../../Assets/DirectoryScannerAssetsFoo',
            ]);

        $this
            ->psrMapping
            ->method('resolvePossibleFilePaths')
            ->willReturnCallback(static function (Identifier $identifier): array {
                if ($identifier->getName() === Foo::class) {
                    return [__DIR__ . '/../../../Assets/DirectoryScannerAssets/Foo.php'];
                }

                if ($identifier->getName() === Foo::class . 'potato') {
                    return [__DIR__ . '/../../../Assets/DirectoryScannerAssets/Foopotato.php'];
                }

                if ($identifier->getName() === 'Roave\\BetterReflectionTest\\Assets\\DirectoryScannerAssets\\Bar\\Empty') {
                    return [__DIR__ . '/../../../Assets/DirectoryScannerAssets/Bar/Empty.php'];
                }

                return [];
            });
    }

    public function testWillLocateExistingFileWithMatchingClass(): void
    {
        $located = $this->psrLocator->locateIdentifier(
            $this->reflector,
            new Identifier(
                Foo::class,
                new IdentifierType(IdentifierType::IDENTIFIER_CLASS),
            ),
        );

        self::assertNotNull($located);
        self::assertSame(Foo::class, $located->getName());
    }

    public function testWillNotLocateNonExistingFileWithMatchingPsr4Class(): void
    {
        self::assertNull($this->psrLocator->locateIdentifier(
            $this->reflector,
            new Identifier(
                Foo::class . 'potato',
                new IdentifierType(IdentifierType::IDENTIFIER_CLASS),
            ),
        ));
    }

    public function testWillNotLocateExistingFileWithMatchingPsr4ClassAndNoContents(): void
    {
        self::assertNull($this->psrLocator->locateIdentifier(
            $this->reflector,
            new Identifier(
                'Roave\\BetterReflectionTest\\Assets\\DirectoryScannerAssets\\Bar\\Empty',
                new IdentifierType(IdentifierType::IDENTIFIER_CLASS),
            ),
        ));
    }

    public function testWillNotLocateClassNotMatchingPsr4Mappings(): void
    {
        self::assertNull($this->psrLocator->locateIdentifier(
            $this->reflector,
            new Identifier(
                'Blah',
                new IdentifierType(IdentifierType::IDENTIFIER_CLASS),
            ),
        ));
    }

    public function testWillNotLocateClassWhenFileDoesNotExist(): void
    {
        $astLocator = BetterReflectionSingleton::instance()
            ->astLocator();

        $locator = new PsrAutoloaderLocator(
            Psr4Mapping::fromArrayMappings([
                'Roave\\BetterReflectionTest\\Assets\\DirectoryScannerAssets\\' => [
                    __DIR__ . '/../../../Assets/DirectoryScannerAssets',
                ],
            ]),
            $astLocator,
        );

        self::assertNull($locator->locateIdentifier(
            $this->reflector,
            new Identifier(
                'BlahBlah',
                new IdentifierType(IdentifierType::IDENTIFIER_CLASS),
            ),
        ));
    }

    public function testWillLocateAllClassesInMappedPsr4Paths(): void
    {
        $astLocator = BetterReflectionSingleton::instance()
            ->astLocator();

        $locator = new PsrAutoloaderLocator(
            Psr4Mapping::fromArrayMappings([
                'Roave\\BetterReflectionTest\\Assets\\DirectoryScannerAssets\\' => [
                    __DIR__ . '/../../../Assets/DirectoryScannerAssets',
                ],
                'Roave\\BetterReflectionTest\\Assets\\DirectoryScannerAssetsFoo\\' => [
                    __DIR__ . '/../../../Assets/DirectoryScannerAssetsFoo',
                ],
            ]),
            $astLocator,
        );

        $expected = [
            FooBar::class,
            Foo::class,
            FooBar1::class,
            Foo1::class,
        ];

        $actual = array_map(
            static fn (Reflection $reflection): string => $reflection->getName(),
            $locator->locateIdentifiersByType(
                new DefaultReflector($locator),
                new IdentifierType(IdentifierType::IDENTIFIER_CLASS),
            ),
        );

        // Sorting may depend on filesystem here
        sort($expected);
        sort($actual);

        self::assertSame($expected, $actual);
    }
}