mirror of
https://github.com/GTNewHorizons/CraftTweaker.git
synced 2026-11-18 19:29:08 +00:00
- Added doclet
- Added documentation to some classes - Started working on tutorial and website
This commit is contained in:
1 parent
97c7f42400
commit
f3ea7f7831
51 files changed
+11420
-61
No files matched your search
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
package stanhebben.zenscript.docs;
|
||||
|
||||
import com.sun.javadoc.AnnotationDesc;
|
||||
import com.sun.javadoc.Parameter;
|
||||
import com.sun.javadoc.Type;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Stan
|
||||
*/
|
||||
public class ZenParameterDoc {
|
||||
private boolean optional;
|
||||
private final String name;
|
||||
private final Type type;
|
||||
|
||||
public ZenParameterDoc(Parameter parameter) {
|
||||
optional = false;
|
||||
name = parameter.name();
|
||||
type = parameter.type();
|
||||
|
||||
for (AnnotationDesc annotation : parameter.annotations()) {
|
||||
if (annotation.annotationType().qualifiedName().equals("stanhebben.zenscript.annotations.Optional")) {
|
||||
optional = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isOptional() {
|
||||
return optional;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public Type getType() {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user