<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Creating Custom Annotations and Using Them</title>
	<atom:link href="http://isagoksu.com/2009/development/java/creating-custom-annotations-and-making-use-of-them/feed/" rel="self" type="application/rss+xml" />
	<link>http://isagoksu.com/2009/development/java/creating-custom-annotations-and-making-use-of-them/</link>
	<description>Nobody can be perfect, but you can think better, design better, and always use baby steps!</description>
	<lastBuildDate>Wed, 08 Sep 2010 02:36:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: pk</title>
		<link>http://isagoksu.com/2009/development/java/creating-custom-annotations-and-making-use-of-them/comment-page-1/#comment-5122</link>
		<dc:creator>pk</dc:creator>
		<pubDate>Mon, 21 Dec 2009 18:47:55 +0000</pubDate>
		<guid isPermaLink="false">http://isagoksu.com/?p=565#comment-5122</guid>
		<description>&lt;p&gt;My question is here we are using a demo class that uses the parser. But say I want to make the code for JDBC connection to be generated using annotations. Is that possible using annotations. How to do that?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>My question is here we are using a demo class that uses the parser. But say I want to make the code for JDBC connection to be generated using annotations. Is that possible using annotations. How to do that?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: DHorst</title>
		<link>http://isagoksu.com/2009/development/java/creating-custom-annotations-and-making-use-of-them/comment-page-1/#comment-3740</link>
		<dc:creator>DHorst</dc:creator>
		<pubDate>Fri, 09 Oct 2009 06:50:00 +0000</pubDate>
		<guid isPermaLink="false">http://isagoksu.com/?p=565#comment-3740</guid>
		<description>&lt;p&gt;Thank you for your great work. Now it is clear for me! :-)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thank you for your great work. Now it is clear for me! :-)</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Isa Goksu</title>
		<link>http://isagoksu.com/2009/development/java/creating-custom-annotations-and-making-use-of-them/comment-page-1/#comment-3734</link>
		<dc:creator>Isa Goksu</dc:creator>
		<pubDate>Thu, 08 Oct 2009 18:55:31 +0000</pubDate>
		<guid isPermaLink="false">http://isagoksu.com/?p=565#comment-3734</guid>
		<description>&lt;p&gt;@פורומים, @DHorst I&#039;ve added a very simple working example to the post. Hope it clarifies a bit!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@פורומים, @DHorst I&#8217;ve added a very simple working example to the post. Hope it clarifies a bit!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: פורומים</title>
		<link>http://isagoksu.com/2009/development/java/creating-custom-annotations-and-making-use-of-them/comment-page-1/#comment-3731</link>
		<dc:creator>פורומים</dc:creator>
		<pubDate>Thu, 08 Oct 2009 11:46:11 +0000</pubDate>
		<guid isPermaLink="false">http://isagoksu.com/?p=565#comment-3731</guid>
		<description>&lt;p&gt;Please answer @DHorst, thanks!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Please answer @DHorst, thanks!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: DHorst</title>
		<link>http://isagoksu.com/2009/development/java/creating-custom-annotations-and-making-use-of-them/comment-page-1/#comment-3730</link>
		<dc:creator>DHorst</dc:creator>
		<pubDate>Thu, 08 Oct 2009 11:06:50 +0000</pubDate>
		<guid isPermaLink="false">http://isagoksu.com/?p=565#comment-3730</guid>
		<description>&lt;p&gt;How can i call my instance method, using &gt;&gt;method.invoke(null);&lt;&lt; does not work?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>How can i call my instance method, using &gt;&gt;method.invoke(null);&lt;&lt; does not work?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: DHorst</title>
		<link>http://isagoksu.com/2009/development/java/creating-custom-annotations-and-making-use-of-them/comment-page-1/#comment-3729</link>
		<dc:creator>DHorst</dc:creator>
		<pubDate>Thu, 08 Oct 2009 08:16:23 +0000</pubDate>
		<guid isPermaLink="false">http://isagoksu.com/?p=565#comment-3729</guid>
		<description>&lt;p&gt;Thanks for your fast answer. :-)
The class where i use the @Copyright Annotation have to look like this?&lt;/p&gt;

&lt;p&gt;public class MyTest {&lt;/p&gt;

&lt;p&gt;@Copyright
  public String info() {
    // do something
    return &quot;AWESOME&quot;;
  }
}&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks for your fast answer. :-)
The class where i use the @Copyright Annotation have to look like this?</p>

<p>public class MyTest {</p>

<p>@Copyright
  public String info() {
    // do something
    return &#8220;AWESOME&#8221;;
  }
}</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Isa Goksu</title>
		<link>http://isagoksu.com/2009/development/java/creating-custom-annotations-and-making-use-of-them/comment-page-1/#comment-3728</link>
		<dc:creator>Isa Goksu</dc:creator>
		<pubDate>Thu, 08 Oct 2009 08:09:33 +0000</pubDate>
		<guid isPermaLink="false">http://isagoksu.com/?p=565#comment-3728</guid>
		<description>&lt;p&gt;@DHorst, yeah you can do. I invoked method since &lt;em&gt;@Test&lt;/em&gt; annotation works like that. If you want reading an attribute value and then executing different things depending on the value, all you need to do is placing conditional logic there. here is an example:&lt;/p&gt;

&lt;p&gt;&lt;pre class=&quot;sh_java&quot;&gt;
// this is how you access to the attributes
Test test = method.getAnnotation(Test.class);
// we use Class type here because our attribute type
// is class. If it would be string, you&#039;d use string
String info = test.info();&lt;/p&gt;

&lt;p&gt;if (&quot;AWESOME&quot;.equals(info)) {
  System.out.println(&quot;info is given as &#039;AWESOME&#039;&quot;);
}
&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;Hope it gives the idea. Ideally you would delegate this logic to some other class :)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@DHorst, yeah you can do. I invoked method since <em>@Test</em> annotation works like that. If you want reading an attribute value and then executing different things depending on the value, all you need to do is placing conditional logic there. here is an example:</p>

<p><pre class="sh_java">
// this is how you access to the attributes
Test test = method.getAnnotation(Test.class);
// we use Class type here because our attribute type
// is class. If it would be string, you'd use string
String info = test.info();</pre></p>

<p>if ("AWESOME".equals(info)) {
  System.out.println("info is given as 'AWESOME'");
}
</p>

<p>Hope it gives the idea. Ideally you would delegate this logic to some other class :)</p>]]></content:encoded>
	</item>
	<item>
		<title>By: DHorst</title>
		<link>http://isagoksu.com/2009/development/java/creating-custom-annotations-and-making-use-of-them/comment-page-1/#comment-3727</link>
		<dc:creator>DHorst</dc:creator>
		<pubDate>Thu, 08 Oct 2009 07:29:37 +0000</pubDate>
		<guid isPermaLink="false">http://isagoksu.com/?p=565#comment-3727</guid>
		<description>&lt;p&gt;I have a question for understanding, is it possible to implement own code for the Test-Interface or can i only call methods? For example, i want to execute a snippet whenever the parser reaches an annotation. Where do i implement this for the Test-Interface?&lt;/p&gt;

&lt;p&gt;Do you have an example Parser for your first snippet &gt;&gt;String info() default &quot;&quot;;&lt;&lt;  ?&lt;/p&gt;

&lt;p&gt;thx!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I have a question for understanding, is it possible to implement own code for the Test-Interface or can i only call methods? For example, i want to execute a snippet whenever the parser reaches an annotation. Where do i implement this for the Test-Interface?</p>

<p>Do you have an example Parser for your first snippet &gt;&gt;String info() default &#8220;&#8221;;&lt;&lt;  ?</p>

<p>thx!</p>]]></content:encoded>
	</item>
</channel>
</rss>
