javaee7-simple-sample | A simple Java EE 7 Sample | Build Tool library
kandi X-RAY | javaee7-simple-sample Summary
kandi X-RAY | javaee7-simple-sample Summary
This is a trivial Java EE 7 sample.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Get the current person list
- Returns the person with the given ID
- Returns the person with the given id
- Returns the person with the given ID
- Initialize the Person
javaee7-simple-sample Key Features
javaee7-simple-sample Examples and Code Snippets
Community Discussions
Trending Discussions on javaee7-simple-sample
QUESTION
I have this groovy script that is executed on nexus:
...ANSWER
Answered 2018-Aug-02 at 05:10Iterables
is a utility class (it contains only static method and cannot be instantiated).
I guess that your com.google.common.collect.Iterables$4
is just some anonymous class implementing java.lang.Iterable
.
To sum up, defining components
as Iterable
should work for you.
EDIT: To answer your follow-up questions:
1) You wrote that it does not look like Iterables
implements Iterable
, and you're right - it doesn't. In order to understand what com.google.common.collect.Iterables$4
means you need to understand the compilation naming rules of anonymous classes.
In short, com.google.common.collect.Iterables$4
means "4th anonymous class nested in com.google.common.collect.Iterables
class".
2) As to how you find out the type without guessing - you simply track the API and what it returns:
Repository.facet
returns aFacet
of given type (here:StorageFacet
)StorageFacet.txSupplier
returnsSupplier
StorageTx.browseComponents
returnsIterable
Note that it's all interfaces above, so we still don't see from this how the returned Iterable
is implemented.
To find out about this, we need to see into the implementation: StorageTxImpl
. This, however, delegates the call further and I don't feel like tracing it any further (you can do it on your own if you wish; it'd much be easier to do if one opened this project in an IDE, though).
However, I know that what happens there is that a call to one of the methods in Guava's Iterables
utility class is made, which in turn returns Iterable
implemented by means of an anonymous class, and that's all.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install javaee7-simple-sample
You can use javaee7-simple-sample like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the javaee7-simple-sample component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page