[Roaster] Type<?> instanceof
by Daniel Cunha
Hi folks,
I want do that:
type instanceof Number.
That case, my type can be AtomicInteger, AtomicLong, BigDecimal,
BigInteger, Byte, Double, Float, Integer, Long and Short
Eg:.
public static Type<?> getIdType(JavaClass<?> entity)
{
for (Member<?> member : entity.getMembers())
{
if (member.hasAnnotation(Id.class))
{
if (member instanceof Method)
{
return ((Method<?, ?>) member).getReturnType();
}
if (member instanceof Field)
{
return ((Field<?>) member).getType();
}
}
}
return null;
}
public static boolean isNumberIdType(JavaClass<?> entity)
{
return getIdType(entity) instanceof Number;
}
I see the code and I don’t see a simple form to do it.
How I do that with Roaster Type<?>?
I thought to do that in Types (roaster util):
public static boolean isNumber(final String type)
{
if (isBasicType(type))
{
if (isPrimitive(type))
{
return Arrays.asList("int", "long", "float", "double",
"short").contains(type);
}
return Arrays.asList("Boolean", "Byte", "Double", "Float",
"Integer", "Long", "Short").contains(
type);
}
return false;
}
But, it isn’t good.
--
Daniel Cunha (soro) <http://www.cejug.net>
Blog: http://www.danielsoro.com.br
Twitter: https://twitter.com/dvlc_
GitHub: https://github.com/danielsoro
LinkedIn: http://www.linkedin.com/in/danielvlcunha
10 years, 6 months
Forge 2.7.0.Final released
by George Gastaldi
Hello everyone!
JBoss Forge 2.7.0.Final was just released.
Blog post in the works.
Forge on!
George Gastaldi
10 years, 6 months
Forge Meeting Minutes - 2014-07-02
by Lincoln Baxter, III
Minutes:
http://transcripts.jboss.org/meeting/irc.freenode.org/forge/2014/forge.20...
Minutes (text):
http://transcripts.jboss.org/meeting/irc.freenode.org/forge/2014/forge.20...
Log:
http://transcripts.jboss.org/meeting/irc.freenode.org/forge/2014/forge.20...
Meeting summary
---------------
* Agenda (lincolnthree, 14:45:21)
* JBT Beta3 Lockdown Tasks (lincolnthree, 14:47:46)
* codefreeze for JBT Beta3 is today (gastaldi, 14:48:00)
* LINK: https://issues.jboss.org/browse/JBIDE-17723 (lincolnthree,
14:50:03)
* LINK: https://issues.jboss.org/browse/JBIDE-17622 (lincolnthree,
14:50:27)
* LINK:
https://issues.jboss.org/browse/JBIDE-17008?filter=12321870&jql=project%2...
(lincolnthree, 14:51:46)
* 2.7.0.Final release (lincolnthree, 15:09:06)
* 2.7.0.Final will be released today (gastaldi, 15:10:02)
* Website status (gastaldi, 15:11:21)
* waiting on eng-ops to update CNAME to new site (lincolnthree,
15:15:48)
* designer is working on new visual theme, will apply once completed
(lincolnthree, 15:16:02)
* new visual design target date is August 15 (lincolnthree, 15:16:10)
* Windows issues (yet again) (lincolnthree, 15:16:19)
* Forge 2.7.0.Final will be in JBT Beta3 (lincolnthree, 15:21:42)
Meeting ended at 15:21:44 UTC.
--
Lincoln Baxter, III
http://ocpsoft.org
"Simpler is better."
10 years, 6 months
How do I install the Arquillian add-on from Git ?
by Antonio Goncalves
Hi guys,
I would like to install the Arquillian add-on straight from Github. I do
the following :
addon-install-from-git --url
https://github.com/agoncal/plugin-arquillian.git --branch forge2
But I get the following error. Am I missing something ? The
addon-install-from-git has a "coordonates" parameter but I don't know what
to enter and if it's useful.
Thanks
Antonio
[projarq]$ addon-install-from-git --url
https://github.com/agoncal/plugin-arquillian.git --branch forge2
***INFO*** Installing git addon [0/4] ...
***INFO*** Installing git addon:Cloning repository in
/var/folders/ds/w5m7dxx91t98p0s19sjcv6_00000gn/T/1402306123063-0 [0/4] ...
***INFO*** Installing git addon:Installing project into local repository [1/4]
...
***INFO*** Installing git addon:Removing previous addon installation
(org.arquillian.forge:arquillian-plugin,1.0.0-SNAPSHOT) [2/4] ...
***INFO*** Installing git addon:Installing addon
(org.arquillian.forge:arquillian-plugin,1.0.0-SNAPSHOT) [3/4] ...
Downloading:
http://repo1.maven.org/maven2/org/arquillian/forge/arquillian-plugin/1.0....
***ERROR*** Addon org.arquillian.forge:arquillian-plugin,1.0.0-SNAPSHOT
could not be installed.
*From the logs :*
11:35:10,037 SEVERE [org.jboss.forge.addon.shell.aesh.CommandAdapter]
(AeshProcess: 7) Addon
org.arquillian.forge:arquillian-plugin,1.0.0-SNAPSHOT could not be
installed.: java.lang.RuntimeException:
org.eclipse.aether.resolution.DependencyResolutionException: Failure to
find org.arquillian.forge:arquillian-plugin:jar:forge-addon:1.0.0-SNAPSHOT
in http://repo1.maven.org/maven2 was cached in the local repository,
resolution will not be reattempted until the update interval of central has
elapsed or updates are forced
at
org.jboss.forge.furnace.manager.maven.addon.MavenAddonDependencyResolver.resolveResources(MavenAddonDependencyResolver.java:111)
[furnace-manager-resolver-maven-2.6.1-20140604.061652-2.jar:2.6.1-SNAPSHOT]
at
org.jboss.forge.furnace.manager.maven.addon.LazyAddonInfo.resolveResources(LazyAddonInfo.java:88)
[furnace-manager-resolver-maven-2.6.1-20140604.061652-2.jar:2.6.1-SNAPSHOT]
at
org.jboss.forge.furnace.manager.maven.addon.LazyAddonInfo.getResources(LazyAddonInfo.java:39)
[furnace-manager-resolver-maven-2.6.1-20140604.061652-2.jar:2.6.1-SNAPSHOT]
at
org.jboss.forge.furnace.manager.impl.request.DeployRequestImpl.deploy(DeployRequestImpl.java:59)
[furnace-manager-2.6.1-20140604.061628-2.jar:2.6.1-SNAPSHOT]
at
org.jboss.forge.furnace.manager.impl.request.DeployRequestImpl$1.call(DeployRequestImpl.java:49)
[furnace-manager-2.6.1-20140604.061628-2.jar:2.6.1-SNAPSHOT]
at
org.jboss.forge.furnace.impl.LockManagerImpl.performLocked(LockManagerImpl.java:48)
[furnace-2.6.1-20140604.061525-2.jar:2.6.1-SNAPSHOT]
at
org.jboss.forge.furnace.manager.impl.request.DeployRequestImpl.execute(DeployRequestImpl.java:44)
[furnace-manager-2.6.1-20140604.061628-2.jar:2.6.1-SNAPSHOT]
at
org.jboss.forge.furnace.manager.impl.request.AbstractAddonActionRequest.perform(AbstractAddonActionRequest.java:57)
[furnace-manager-2.6.1-20140604.061628-2.jar:2.6.1-SNAPSHOT]
at
org.jboss.forge.furnace.manager.impl.request.InstallRequestImpl.perform(InstallRequestImpl.java:39)
[furnace-manager-2.6.1-20140604.061628-2.jar:2.6.1-SNAPSHOT]
at
org.jboss.forge.addon.manager.impl.ui.AddonGitBuildAndInstallCommand.execute(AddonGitBuildAndInstallCommand.java:145)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[rt.jar:1.7.0_45]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[rt.jar:1.7.0_45]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[rt.jar:1.7.0_45]
at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]
at
org.jboss.forge.furnace.proxy.ClassLoaderInterceptor$1.call(ClassLoaderInterceptor.java:65)
[furnace-proxy-2.6.1-20140604.061510-2.jar:2.6.1-SNAPSHOT]
at
org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:34)
[furnace-api-2.6.1-20140604.061455-2.jar:2.6.1-SNAPSHOT]
at
org.jboss.forge.furnace.proxy.ClassLoaderInterceptor.invoke(ClassLoaderInterceptor.java:81)
[furnace-proxy-2.6.1-20140604.061510-2.jar:2.6.1-SNAPSHOT]
at
org.jboss.forge.addon.manager.impl.ui.AddonGitBuildAndInstallCommand_$$_javassist_56c43058-db1a-405c-85d8-9f70b3553106.execute(AddonGitBuildAndInstallCommand_$$_javassist_56c43058-db1a-405c-85d8-9f70b3553106.java)
at
org.jboss.forge.addon.ui.impl.controller.SingleCommandControllerImpl.execute(SingleCommandControllerImpl.java:88)
[ui-impl-2.6.1-SNAPSHOT.jar:2.6.1-SNAPSHOT]
at
org.jboss.forge.addon.shell.aesh.CommandAdapter.execute(CommandAdapter.java:74)
[shell-impl-2.6.1-SNAPSHOT.jar:2.6.1-SNAPSHOT]
at
org.jboss.aesh.console.AeshConsoleImpl$AeshConsoleCallbackImpl.execute(AeshConsoleImpl.java:298)
[aesh-0.55.jar:0.55]
at org.jboss.aesh.console.AeshProcess.run(AeshProcess.java:39)
[aesh-0.55.jar:0.55]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_45]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_45]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
Caused by: org.eclipse.aether.resolution.DependencyResolutionException:
Failure to find
org.arquillian.forge:arquillian-plugin:jar:forge-addon:1.0.0-SNAPSHOT in
http://repo1.maven.org/maven2 was cached in the local repository,
resolution will not be reattempted until the update interval of central has
elapsed or updates are forced
at
org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:384)
[aether-impl-0.9.0.M2.jar:]
at
org.jboss.forge.furnace.manager.maven.addon.MavenAddonDependencyResolver.resolveResources(MavenAddonDependencyResolver.java:107)
[furnace-manager-resolver-maven-2.6.1-20140604.061652-2.jar:2.6.1-SNAPSHOT]
... 24 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException:
Failure to find
org.arquillian.forge:arquillian-plugin:jar:forge-addon:1.0.0-SNAPSHOT in
http://repo1.maven.org/maven2 was cached in the local repository,
resolution will not be reattempted until the update interval of central has
elapsed or updates are forced
at
org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:459)
[aether-impl-0.9.0.M2.jar:]
at
org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:262)
[aether-impl-0.9.0.M2.jar:]
at
org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:367)
[aether-impl-0.9.0.M2.jar:]
... 25 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Failure
to find
org.arquillian.forge:arquillian-plugin:jar:forge-addon:1.0.0-SNAPSHOT in
http://repo1.maven.org/maven2 was cached in the local repository,
resolution will not be reattempted until the update interval of central has
elapsed or updates are forced
at
org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:232)
[aether-impl-0.9.0.M2.jar:]
at
org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:206)
[aether-impl-0.9.0.M2.jar:]
at
org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:599)
[aether-impl-0.9.0.M2.jar:]
at
org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:518)
[aether-impl-0.9.0.M2.jar:]
at
org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:436)
[aether-impl-0.9.0.M2.jar:]
... 27 more
--
Antonio Goncalves
Software architect and Java Champion
Web site <http://www.antoniogoncalves.org/> | Twitter
<http://twitter.com/agoncal> | LinkedIn <http://www.linkedin.com/in/agoncal>
| Paris JUG <http://www.parisjug.org/> | Devoxx France
<http://www.devoxx.fr/>
10 years, 6 months