Author: spagop
Date: 2008-07-23 13:17:17 -0400 (Wed, 23 Jul 2008)
New Revision: 367
Added:
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/ConstructorMetadata.java
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/MethodMetadata.java
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/MethodTypeMemberMetadata.java
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/ParameterizedFieldMetadata.java
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/PrimitiveFieldMetadata.java
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/SimpleFieldMetadata.java
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/Variable.java
Modified:
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/ClassMetadata.java
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/FieldMetadata.java
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/TypeMetadata.java
Log:
enhancement for the JavaMetadata "minimal fields and methods member of type";
"constructor of class"
Modified:
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/ClassMetadata.java
===================================================================
---
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/ClassMetadata.java 2008-07-23
17:12:46 UTC (rev 366)
+++
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/ClassMetadata.java 2008-07-23
17:17:17 UTC (rev 367)
@@ -21,9 +21,13 @@
*/
package org.jboss.dna.sequencer.java.metadata;
+import java.util.List;
+
+
/**
* @author Serge Pagop
*/
public class ClassMetadata extends TypeMetadata {
+
}
Added:
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/ConstructorMetadata.java
===================================================================
---
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/ConstructorMetadata.java
(rev 0)
+++
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/ConstructorMetadata.java 2008-07-23
17:17:17 UTC (rev 367)
@@ -0,0 +1,29 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.dna.sequencer.java.metadata;
+
+/**
+ *
+ */
+public class ConstructorMetadata extends MethodMetadata {
+
+}
Modified:
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/FieldMetadata.java
===================================================================
---
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/FieldMetadata.java 2008-07-23
17:12:46 UTC (rev 366)
+++
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/FieldMetadata.java 2008-07-23
17:17:17 UTC (rev 367)
@@ -21,25 +21,28 @@
*/
package org.jboss.dna.sequencer.java.metadata;
+import java.util.ArrayList;
+import java.util.List;
+
/**
* @author Serge Pagop
*/
public class FieldMetadata {
-
+
/** The name */
- private String name;
+ private List<Variable> variables = new ArrayList<Variable>();
/**
- * @return name
+ * @return variables
*/
- public String getName() {
- return name;
+ public List<Variable> getVariables() {
+ return variables;
}
/**
- * @param name Sets name to the specified value.
+ * @param variables Sets variables to the specified value.
*/
- public void setName( String name ) {
- this.name = name;
+ public void setVariables( List<Variable> variables ) {
+ this.variables = variables;
}
}
Added:
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/MethodMetadata.java
===================================================================
---
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/MethodMetadata.java
(rev 0)
+++
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/MethodMetadata.java 2008-07-23
17:17:17 UTC (rev 367)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.dna.sequencer.java.metadata;
+
+/**
+ *
+ */
+public class MethodMetadata {
+ private String name;
+
+ /**
+ * @return name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @param name Sets name to the specified value.
+ */
+ public void setName( String name ) {
+ this.name = name;
+ }
+
+}
Added:
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/MethodTypeMemberMetadata.java
===================================================================
---
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/MethodTypeMemberMetadata.java
(rev 0)
+++
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/MethodTypeMemberMetadata.java 2008-07-23
17:17:17 UTC (rev 367)
@@ -0,0 +1,29 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.dna.sequencer.java.metadata;
+
+/**
+ *
+ */
+public class MethodTypeMemberMetadata extends MethodMetadata {
+
+}
Added:
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/ParameterizedFieldMetadata.java
===================================================================
---
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/ParameterizedFieldMetadata.java
(rev 0)
+++
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/ParameterizedFieldMetadata.java 2008-07-23
17:17:17 UTC (rev 367)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.dna.sequencer.java.metadata;
+
+import java.util.List;
+
+/**
+ * Field meta data for parameterized type.
+ */
+public class ParameterizedFieldMetadata extends FieldMetadata {
+
+ private String name;
+
+ /**
+ * @param name
+ */
+ public void setName( String name ) {
+ this.name = name;
+ }
+
+ /**
+ * @return name
+ */
+ public String getName() {
+ return name;
+ }
+
+}
Added:
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/PrimitiveFieldMetadata.java
===================================================================
---
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/PrimitiveFieldMetadata.java
(rev 0)
+++
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/PrimitiveFieldMetadata.java 2008-07-23
17:17:17 UTC (rev 367)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.dna.sequencer.java.metadata;
+
+/**
+ * FieldMetadata for primitive types
+ */
+public class PrimitiveFieldMetadata extends FieldMetadata {
+
+ /** The code */
+ private String code;
+
+ /**
+ * @return code
+ */
+ public String getCode() {
+ return code;
+ }
+
+ /**
+ * @param code Sets code to the specified value.
+ */
+ public void setCode( String code ) {
+ this.code = code;
+ }
+
+}
Added:
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/SimpleFieldMetadata.java
===================================================================
---
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/SimpleFieldMetadata.java
(rev 0)
+++
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/SimpleFieldMetadata.java 2008-07-23
17:17:17 UTC (rev 367)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.dna.sequencer.java.metadata;
+
+/**
+ * field meta data for simple type.
+ */
+public class SimpleFieldMetadata extends FieldMetadata {
+
+ private String name;
+
+ /**
+ * @param name
+ */
+ public void setName( String name ) {
+ this.name = name;
+ }
+
+ /**
+ * @return name
+ */
+ public String getName() {
+ return name;
+ }
+
+}
Modified:
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/TypeMetadata.java
===================================================================
---
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/TypeMetadata.java 2008-07-23
17:12:46 UTC (rev 366)
+++
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/TypeMetadata.java 2008-07-23
17:17:17 UTC (rev 367)
@@ -32,18 +32,24 @@
* @author Serge Pagop
*/
public class TypeMetadata {
-
+
public static final int PUBLIC_MODIFIER = 0;
-
+
/** The name. */
private String name;
/** All modifiers of a top level type */
private Map<Integer, String> modifiers = new HashMap<Integer, String>();
- /** All annotations of the type meta data */
- private List<AnnotationMetadata> annotationMetadata = new
ArrayList<AnnotationMetadata>();
+ /** All annotations of a top level type */
+ private List<AnnotationMetadata> annotations = new
ArrayList<AnnotationMetadata>();
+ /** All fields of a top level type */
+ private List<FieldMetadata> fields = new ArrayList<FieldMetadata>();
+
+ /** All methods of a top level type */
+ private List<MethodMetadata> methods = new ArrayList<MethodMetadata>();
+
/**
* Get the name.
*
@@ -63,17 +69,17 @@
}
/**
- * @return annotationMetadata
+ * @return annotations
*/
- public List<AnnotationMetadata> getAnnotationMetadata() {
- return annotationMetadata;
+ public List<AnnotationMetadata> getAnnotations() {
+ return annotations;
}
/**
- * @param annotationMetadata Sets annotationMetadata to the specified value.
+ * @param annotations Sets annotations to the specified value.
*/
- public void setAnnotationMetadata( List<AnnotationMetadata> annotationMetadata
) {
- this.annotationMetadata = annotationMetadata;
+ public void setAnnotations( List<AnnotationMetadata> annotations ) {
+ this.annotations = annotations;
}
/**
@@ -90,4 +96,32 @@
this.modifiers = modifiers;
}
+ /**
+ * @return fields of this top level unit.
+ */
+ public List<FieldMetadata> getFields() {
+ return this.fields;
+ }
+
+ /**
+ * @param fields Sets fields to the specified value.
+ */
+ public void setFields( List<FieldMetadata> fields ) {
+ this.fields = fields;
+ }
+
+ /**
+ * @return methods of this top level unit.
+ */
+ public List<MethodMetadata> getMethods() {
+ return methods;
+ }
+
+ /**
+ * @param methods Sets methods to the specified value.
+ */
+ public void setMethods( List<MethodMetadata> methods ) {
+ this.methods = methods;
+ }
+
}
Added:
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/Variable.java
===================================================================
---
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/Variable.java
(rev 0)
+++
trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/Variable.java 2008-07-23
17:17:17 UTC (rev 367)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.dna.sequencer.java.metadata;
+
+/**
+ * A variable
+ */
+public class Variable {
+
+ private String name;
+
+ public Variable() {
+ }
+
+ public Variable( String name ) {
+ this.name = name;
+ }
+
+ /**
+ * @return name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @param name Sets name to the specified value.
+ */
+ public void setName( String name ) {
+ this.name = name;
+ }
+
+}